What Are Block Tags?
Block tags force everything that is outside of them to be on a separate line. One such tag is the heading tag:
Example:
<h1>Learning HTML</h1>
</body>
The number 1 beside the letter h makes the largest heading. Numbers, 2, 3 and 4 will make smaller headings. All of them make bold text. Let's see how our HTML code is shaping up:
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
</head>
<h1>Learning HTML</h1> Look Ma, I'm making a webpage!
</body>
</html>
This is what it should look like on the webpage:
Notice that the text outside the h1 tag is on a separate line. This is what block tags do, they force the stuff they don't enclose to be on a separate line.
Making Paragraphs
Another block tag is the paragraph tag:
Any text put between the opening and closing p tags makes one paragraph. To start a new line within a paragraph add the br tag:
The br tag is one of the few HTML tags which does not have a corresponding closing tag. The result would look like this:
Look Ma,
I'm making a webpage!
Give it a try and then head on over to lesson 3.