Grokking HTML
Vote

0% completed

​

HTML Paragraphs

The browser ignores the way you lay out text in your HTML file. Extra spaces, tabs and line breaks in the source make no difference to the page. Look at this paragraph, written over two lines with several spaces between some words:

<p>Mix the flour and the sugar. Then add the milk.</p>

The browser shows it as one line of text with single spaces:

Mix the flour and the sugar. Then add the milk.

While it reads the text, the browser replaces every run of spaces, tabs and line breaks with a single space. This is called whitespace collapsing

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content