Headings, paragraphs and text
Headings, paragraphs and text
Use headings in a meaningful hierarchy rather than choosing them for their visual size. Paragraphs represent blocks of text. Strong and em express importance and emphasis; code represents code fragments. Browsers provide default styling that CSS can later change.
Try it yourself
Change the example, run it, and explain the result in your own words. Then create one variation of your own.
Key idea
Use the example as a starting point, not something to memorize. Practise, inspect the result and make small improvements.
Code example
<h1>Learning HTML</h1>
<h2>Text elements</h2>
<p>HTML gives content <strong>meaning</strong>.</p>
<p>Use <code><p></code> for a paragraph.</p>