It is time to add some more text to the page.
Steps to Success
- Type Isn't it cool! after the line This is my first Web page.
- Save and preview in a browser
(click the refresh/reload button to update the page and view your changes)
Notice the browser displays the new text on the same line as This is my first Web page. Even though Notepad displays the two codes on separate lines, the browser will display them on the same line.
With HTML, you must indicate separate paragraphs by using the paragraph element p. - Return to Notepad and put p tags around This is my first Web page.
- Put p tags around Isn't it cool!
Add the following code ( in red) - Save and preview in the browser
(click the refresh/reload button to update the page and view your changes)
<head>
<title>My First Web Page</title>
</head>
<body>
<p>This is my first Web page.</p>
<p>Isn't it cool!</p>
</body>
</html>
How does it effect space on the web page?
The paragraph tag <p> at the beginning of a line will display a line space above the line in the browser, and a </p> tag at the end of a line will display a line space below the line in a browser.
Block-level elements
Note: The p element is also known as a block-level element. There are numerous block-level elements in HTML.
Find out more at http://htmlhelp.com/reference/html40/block.html
Block-level elements are also known as containers or boxes. The concept of block-level element s/containers/boxes is very important when we move into CSS.
A block-level element can contain content. The opening and closing tags define the block/container/box.
Therefore the p element requires an opening <p> and closing tag </p>.