Grokking HTML
Vote

0% completed

​

The <code> Element and Related Elements

Type this sentence into a page, exactly as it stands, and open it in a browser:

<!-- Broken on purpose: the tag inside <code> is not escaped. --> <p>Start every paragraph with <code><p></code>.</p>

The browser shows "Start every paragraph with" and then a period on a line of its own, and the tag you wanted to show has vanished. The browser read <p> as a real start tag, so it closed the first paragraph and began a second one, which holds only the period

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content