Document Tagsquestion marks

I know, I know, you're tired of all this mindless typing. You want to know why you have to type code this way. Okay, you've twisted my arm. Here's the lowdown on tags.

	
<html>    tells the browser that it is dealing with a web page
<head>    provides information about the page, also starts the page
  <title> well, it gives the page a name  </title>
</head>	  End of Header
<body>    Start of the Body of the page 
  <p>     is a paragraph tag  </p> 
  <h1>    level 1 heading </h1> 
  <h2>    level 2 heading (subheading) </h2> 
  <h3>    level 3 heading (subheading) </h3>
</body>   End of the body section
</html>   Tells the browser that this is the end of the HTML

There are heading tags that go all the way to <h6>, which is the smallest of the heading types. While learning HTML in this class, we'll stick with headings 1,2, and 3.

Closing Tags

Notice the Closing Tags. A simple rule of thumb is, if you open the tag, then you have to close the tag. There are a few exceptions, but we'll get into those later. For example, look your basic html code.

<html> 
<head> 
  <title>text</title>
</head>
<body>
  <h1>text</h1>
  <p>text</p>
</body>
</html>

For every tag we used, there is an opening tag and a closing tag, and some tags have text in the middle of them. The code above is your basic html format. You will use it every time you create a web page. Study it, memorize it. Things can get extremely detailed when designing web pages. Do yourself a favor: start by typing in this basic format for every page you design, then let it build from there.

Practice Session

Copy and paste the code below into a new Notepad file, save as "closingtags.html", select all files, and save it into your web page folder. Next, go through the code, line by line, and check for mistakes. Make any needed corrections. Save your work.

<html> 
<head> 
  <title>Checking for Errors<title>
</head>
<body>
  <p>We've learned a lot about tags. Now it is time to see if we remember the basics. 
  There is a specific order we are supposed to type our document tags in, 
  otherwise, our web page won't work. We have headings that range
  from 1 - 6, with 6 being the smallest. Oh yeah,
  everytime we open a tag, we're supposed to close it. 
  <p>
</body>
<html>