HTML Stands for Hyper Text Markup Language. Hypertext is simply text that links to other information, and a markup language is a computer language that uses tags to define elements within a document.

Tags are the basic formatting tool used in HTML and other markup languages, such as XML. A tag is a keyword surrounded by angle brackets. Most tags come in pairs, with an opening tag and a closing tag. The closing tags are identical to the opening tags, but include a slash before the keyword.

Example 1:

<h1>New York is a beautiful city</h1>

The h1 tags describe a top heading. <h1> is the opening tag and </h1> is the closing tag. In our example above, “New York is a beautiful city” is called the content, and all three together are called an HTML element.

Browsers do not display the opening or closing tags; However, the tags tell the browser how to represent the content on the page.

Example 2:

<h1>New York is a beautiful city</h1>
<h2>New York is a beautiful city</h2>
<h3>New York is a beautiful city</h3>
<h4>New York is a beautiful city</h4>
<h5>New York is a beautiful city</h5>
<h6>New York is a beautiful city</h6>

The browser will display the following:

New York is a beautiful city

New York is a beautiful city

New York is a beautiful city

New York is a beautiful city

New York is a beautiful city
New York is a beautiful city

The tags were used to describe the nature of the content and will not be displayed on the page.

Without further ado, let’s create our first HTML5 page. Following the tradition of the “Hello World” examples that introduced us to so many languages, let’s create a webpage that simply displays the phrase “Hello world!”

<!DOCTYPE html>
    <title>Hello World Example</title>
    <p>Hello world!</p>

Here is how the browser interprets our hello world example:

<!DOCTYPE html> must be the first thing you specify in your HTML5 document. Even though it is not case sensitive, it is best practice to write it this way, and we should always add the DOCTYPE declaration at the top of all our HTML5 documents right before the html tags. The browser uses the DOCTYPE declaration to figure out the type of the document it is processing so in order to display it correctly. The DOCTYPE also shows the version of HTML the page is written in.

HTML Versions

Since the early days of the web, there have been many versions of HTML:

Version Year
HTML 1991
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 2000
HTML5 2014

DOCTYPE Declarations

As far as our course is concerned, we will be using the <!DOCTYPE html> declaration in all our pages, but here are some of the DOCTYPE declarations that you may run into:

HTML 5 <!DOCTYPE html>
HTML 4.01 Strict <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “”>
HTML 4.01 Transitional <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “””>
HTML 4.01 Frameset <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “”>
XHTML 1.1 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “”>
XHTML 1.0 Strict <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “”>
XHTML 1.0 Transitional <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
XHTML 1.0 Frameset <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “”>


Please enter your comment!
Please enter your name here