So hopefully that was fun. Let’s get down to the business of actually creating a page.
Because HTML is the skeleton, every Web page starts there. So let’s look at a very simple HTML page.
<html>
<head>
<title>Consider the lobster</title>
</head>
<body>
<h1>Consider the lobster</h1>
<p>The point is that <strong>lobsters</strong> are basically
giant sea-insects.</p>
</body>
</html>
So here you see a small chunk of HTML, that is being used to structure some text. The actual HTML are the words with brackets around them.
[ While pointing out HTML, BODY, H1 and P, make them show up below. ]
So you that around each of these words is those funny angled brackets, we’re sure you’ve seen them before -- they go on either side of the word like a little jacket or coat. Anything with these surrounding them, is called a tag, so this is an HTML tag, this is a BODY tag, this is an H1 tag and this is a P tag.
All right, but what is a *tag* really. Let’s look at the first one more closely.
Does anyone know what the html tag means?
Great. The HTML tag indicates that we’re using HTML. So the words inside any tag defines its purpose. So in this case, the tags are saying, anything in between us, will be HTML code.
<html>
<head>
<title>Consider the lobster</title>
</head>
<body>
<h1>Consider the lobster</h1>
<p>The point is that <strong>lobsters</strong> are basically
giant sea-insects.</p>
</body>
</html>
What about the other tags?
Anything between these two BODY tags appears in the browser window. This is the stuff you actually see on a page. So that’s why the h1 and the p tags are inside of the body. Otherwise they wouldn’t show up!
H1 means that it’s the main heading, like the headline of your story. The Ps are paragraphs. For example, the first P is your lede, the second P is your nut graf.
The strong tag makes some of your text stand out -- that usually makes the text bold. But you notice the second strong tag is different from the first one. It has a backslash before the word “strong”. That means we want the browser to *stop* making the text bold right here. Let's see that in action.
<html>
<head>
<title>Consider the lobster</title>
</head>
<body>
<h1>Consider the lobster</h1>
<p>The point is that <strong>lobsters</strong> are basically
giant sea-insects.</p>
</body>
</html>
The point is that lobsters are basically giant sea-insects.
Works perfectly! But what if we accidentally left it out?
<html>
<head>
<title>Consider the lobster</title>
</head>
<body>
<h1>Consider the lobster</h1>
<p>The point is that <strong>lobsters are basically
giant sea-insects.</p>
</body>
</html>
The point is that lobsters are basically giant sea-insects.