HTML Basics

HTML Language


Simple Tags

In this lesson, you will be introduced to several of the most basic tags of HTML.


<!DOCTYPE html>

This tag simply declares that this document is an HTML document.

<html>

As you have seen in the previous examples, an essential tag in HTML is the <html> tag. Which indicates the contents of your HTML program, and therefore, marking the beginning and end of the program.

To use this tag, simply, in your editor, type the tags (<html> and </html>) at the beginning of the program and at the end. This notifies the computer the HTML program.


<body>

This tag tells the computer that what it includes is the physical part of the program. All you see on this page, for example, is the physical part of this HTML program. For now, all your codes are included in those tags.

Put those tags (<body> and </body>) inside of the <html> tags, but outside of your other codes.


<p>

This is the tag that creates a paragraph in your website! Put the beginning and end tags inside the <body> and <html> tags, at where you want to insert a paragraph. Put what you want to write between those tags and they will appear at that position on your webpage!

Here is an example:

<!DOCTYPE html>
<html>
 <body>
  <p>This is a paragraph.</p>
 </body>
</html>
	  


<h1> ~ <h6>

Those tags indicate headings. The <h1> indicates the main heading; <h2> indicates a secondary heading; <h3> indicates a third level heading... Put your heading between the tags.

Here is an example:

<html>
 <body>
  <h1>Main Heading</h1>
  <h4>Fourth Level Heading</h4>
 </body>
</html>
	  


Practice

Write a program for a page with a heading and three paragraphs.

Add in two second level headings.


Tags

Tag Meaning
<html> HTML program
<body> Physical portion of program
<p> Paragraph
<h1> ~ <h6> Headings



<< Previous TOC Next >>