Extruding edges on the plane
If you want to work entirely on the X-Z plane, like here (note the little axes on the bottom left):



then, every time you extrude, make sure to do E, then ShiftY: this will exclude the Y axis from the extrusion. This works even if you are not in front view.





To fix a mesh that was mistakenly extruded along the Y axis, do A(A)SY0




A: select all (twice if something was already selected)
S: scale ...
&nbsp;&nbsp;Y: ... along the Y axis ...
&nbsp;&nbsp;&nbsp;&nbsp;0 ("zero"): ... until its width is 0% of the original