Recap
In the second lesson, we learned that:
- Headings are created with the elements
h1toh6(h = heading). We choose the level by importance, not by size.h1is the main heading of the page, and a page normally has only one. - Paragraphs are created with the
pelement (paragraph). - The
divelement (division) groups other elements together. It has no meaning of its own. - The
strongelement (strong importance) marks important text, and theemelement (emphasis) marks text we stress. Browsers show them in bold and in italics. If text should only look bold or italic, without extra meaning, we use CSS. - The browser joins spaces, tabs and line breaks that follow one another in the code into a single space. That's why pressing Enter in the code doesn't start a new line on the page, and why indentation doesn't change how the page looks.
- We start a new line with the
brelement (break), which has no content or closing tag. We use it only for line breaks that belong to the content, such as in poems or addresses, not to make space between texts. - Lists are created with the
ol(ordered list) orul(unordered list) element, and their items with thelielement (list item). - Comments are written like this:
<!-- comment -->. The browser doesn't display them.
In this lesson, we learned how to create the text content of web pages. In the next lesson, we will learn what attributes are, how to use links, and how to add media content such as images and videos.
Instructions
Congratulations on completing the second lesson! The editor contains your final code from this lesson, and we will build on it in the next lesson. Now you can try customizing the page with your newly acquired knowledge.
Start programming for free
8/8