< Back

Lecture 1: HTML Elements


HTML is the language of the internet. It is one of only two languages that browsers actually interpret, and is the only language that actually directly renders in browsers. Today we will examine key HTML elements, so that we can discuss the standard layout of an HTML page.


Doctypes

While there is really only one language that directly renders on webpages, there are actually many different types of HTML. HTML 1.0 was released in 1992, and has evolved into HTML5 that we see today. The way your browser knows which one of these standards your page is written in is by the doctype that you specify at the top of your page.

  <!DOCTYPE html> <!-- HTML5 -->
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!-- HTML 4.01 Strict -->
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- HTML 4.01 Transitional -->

The Head Element

The head element of an HTML page defines data that is not directly rendered on the page. This allows you to specify what the title of the page is, as well as include other elements in your HTML files.

  <head>
    <title>
      This is my webpage!
    </title>
  </head>

Body

The body defines the main content of your page. This is what renders in your browser window.

  <body>
      This is my webpage!
  <body>

Others

For the following elements, we will discuss them in class today.

  1. Paragraphs
  2. Divs and Spans
  3. Hyperlinks
  4. Tables and Lists
  5. Images