๐ฏ By the end of this lesson you canโฆ
- Write opening and closing tags
- Nest elements correctly
- Add attributes to elements
๐ HTML ยท CSS ยท JS
nesting.html
๐ Tap a line to explain it
1<h1>My favourite things</h1>2<h2>Food</h2>3<p>I love <strong>mango</strong> and <em>masala dosa</em>.</p>4<p>Line one<br>Line two</p>5<hr>6<p title="Hover me!">Hover over this paragraph.</p>
| Tag | Meaning |
|---|---|
<h1>โฆ<h6> | headings, biggest to smallest |
<p> | a paragraph |
<strong> / <em> | important / emphasised text |
<br> / <hr> | line break / divider (no closing tag) |
<div> / <span> | generic block / inline containers |
๐ Find the error
What is wrong here?
1<p>This is <strong>very important</p></strong>
๐ ๏ธ Mini profile
Make a page with an h1 of your name, an h2 saying About me, and a paragraph where one word is in <strong>.
๐ Key takeaways
<p>text</p>โ an opening tag, content, and a closing tag with/.- Tags nest like boxes inside boxes: close the inner one first.
- Attributes add extra information:
<a href="โฆ">,<img src="โฆ" alt="โฆ">.
Finished reading & practising?
Saved in this browser. Create a free account to keep it forever.