HTML Elements


HTML documents are text files made up of HTML elements. HTML elements are defined using HTML tags.

HTML Tags
HTML Elements
The previous example is shown on the right. The following is an HTML element:
<b>Text is bold</b>
~/public_html/Demo.html
<html>
 <head>
  <title>Title of page</title>
 </head>
 <body>
  My first homepage!
  <b>Text is bold</b>
 </body>
</html>

The HTML element starts with a start tag: <b>. The content of the HTML element is: This text is bold. The HTML element ends with an end tag: </b>. The purpose of the <b> tag is to define an HTML element that should be displayed as bold. This is also an HTML element:
   <body>My first homepage! <b>Text is bold</b></body>
This HTML element starts with the start tag <body>, and ends with the end tag </body>. The purpose of the <body> tag is to define the HTML element that contains the body of the HTML document.

Demonstration
The following demonstration shows how the HTML script is displayed on the Web.

     


Review: HTML Tags
Which is NOT a valid HTML tag?
      body
      description
      head
      title
Result:        




      Never interrupt your enemy when he is making a mistake.    
      — Napoleon Bonaparte