.. include:: commondefs.rst =========================== Part 2 - More HTML elements =========================== Nested elements =============== HTML elements can be **nested** (elements can contain other elements). Example: .. code-block:: html This is a very important paragraph. And this is the result: .. raw:: html This is a very important paragraph. Nested elements: be careful! ============================ However, be careful when you include an element in another. For example, this is not correct: .. code-block:: html This is a very important paragraph. .. raw:: html This is a very important paragraph. When incorrectly nested, Weird behavior and unexpected errors can occur! Headings ======== We have already seen the :html:`h1` element to define a title (headings). You can have several levels of headings in your document: use :html:`h2` for second level, :html:`h3` for third level and so on. Open :filename:`page2.html` and edit the document to include headings. - "What will I learn today?" should be a level 1 headings. - "About the web", "About HTML", and "About CSS" should be level 2 headings. On the slide, you will see the expected result. Headings - expected result ========================== .. figure:: ../_static/headings.png :width: 80% :align: center :alt: expected result with headings :figclass: align-center Lists ===== HTML defines two types of lists: ordered lists (**ol**), and unordered lists (**ul**). In both, a list item is identified by the **li** element. Let's see some examples. Ordered list ============ .. code-block:: html