How do you handle white space in your HTML

Question :

How do you handle white space in your HTML,

Answer :

One of my biggest typographical frustrations about HTML is the way that it mangles conjoined whitespace. For example if I have:

Following punctuation rules.  With two spaces after the period.    

One of the two spaces following the period will be considered to be insignificant whitespace and be removed. I can of course, force the whitespace to be significant with:

Following punctuation rules.  With two spaces after the period.    

but it just irks me to have to do that and I usually don’t bother. Does anyone out there automatically insert significant whitespace into external content submissions that are intended for a web page?

Read More  Should I choose scripting or compiled code for small tasks?

,

If you really want your white space to be preserved, try the css property: white-space: pre;

Or, you could just use a

 tag in your markup.

By the way, it’s a good thing that HTML browsers ignore white space in general, it allows us to have clearly formatted source code, without affecting the output.

That's the answer How do you handle white space in your HTML, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you