Task 1 — Block level elements
Block level elements generally start on a new line, and any markup under or after a block level element also starts on a new line. Examples include headings, divisions, horizontal rules and lists.
- Create
block.htmlwith the code shown and open it in a browser. - Notice the spacing around each block element.
- Add an
<h3>heading and another list item.
Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Block Level Elements</title>
</head>
<body>
<p>I am a paragraph.</p>
<p>I am directly after the paragraph.</p>
<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<div>This is a logical division.</div>
<hr>
<p>I will have a horizontal rule above me.</p>
<ol>
<li>I am part of an ordered list</li>
<li>li stands for list item</li>
<li>You can add as many as you want!</li>
</ol>
<ul>
<li>I am still a list item</li>
<li>This time I am inside an unordered list</li>
</ul>
</body>
</html>