What is HTML?

HTML stands for HyperText Markup Language. A markup language? What is it used for? Let’s discuss what HTML is along with why and where is it used for?

As discussed above, it is a markup language used in creating markups for web pages. For anyone trying to learn web development, the primary thing to learn is HTML. HTML is the standard markup language for creating web pages. It is HTML that tells the browser what and how to display the content. No matter what programming language is used, the script is converted into plain HTML tags which are rendered by the browser and displayed to the user.

A Sample HTML Document

<!DOCTYPE HTML>
<HTML>
<HEAD>   <TITLE> A SAMPLE TITLE </TITLE>
</HEAD>
<BODY>
    A sample body text.
</BODY>
</HTML>

Don’t get puzzled looking at the code above. Below is the explanation of the sample HTML document.

  1. <!DOCTYPE HTML>: It is the declaration tag to define this document as an HTML5 document.
  2. <HTML>: Every HTML document has a root element i.e., <HTML>
  3. <HEAD>: This element contains meta information like meta-title, meta-description etc. (We will discuss about meta tags in further sections). This element also holds links to different CSS and JavaScript files.
  4. <TITLE>: This element is used to specify the title of an HTML page.
  5. <BODY>: This element contains the part of the document which is visible to the user. Various other elements remain within this container to develop a webpage.

You may be wondering why are similar tags used in the document like </HTML> or </BODY>. If you notice carefully, these tags have a forward slash (/) before the name of the element. The forward-slash (/) represents the closing of the tag or element. Most of the elements have their corresponding closing tag/element in HTML. Also, elements must be closed with their corresponding closing element. There are few elements with no closing elements which will be discussed later.

To simplify the explanation, let’s imagine a person. Looking at a person, you can tell that he/she is a person as the DOCTYPE declaration tag does for an HTML document. A person from head to foot represents a whole. HTML tag does the same; keeps all the elements within and makes up the whole document. Likewise, a person’s head has many parts that help recognize a person and distinguish a person from another as an HEAD tag in an HTML document. Similarly, each person has a name and is called by that name. Each webpage also has a title. The same goes for a person’s body and the body of an HTML document. Every element other than HEAD is an element of a BODY that functions separately to perform specific tasks.

Also, note that I have written all elements in uppercase (capital letters). This is not compulsory to have all the elements uppercase. HTML is a non-case sensitive language meaning that HTML, html, hTmL, or Html; all function the same.

1 thought on “What is HTML?”

Leave a Comment

Your email address will not be published. Required fields are marked *