Introduction to Hyper Text Markup Language (HTML)

Visit Our Top Rated Article

Introduction to Hyper Text Markup Language (HTML).

Learn More

Introduction to Hyper Text Markup Language (HTML)

HTML stands for Hyper Text Markup Language. It is a tag language that is used to tag or mark contents of a web page that is to be displayed as they are marked with html and a user can move around different web pages using hyperlinks. For example a path to an image is marked as image, so the image on that path will be displayed on our web page.

<img src =”logo.jpg”>

HTML is a client side tag language that means all browsers can understand and render html code and one does not necessarily need a server to run html code. You can simply type html code in a notepad.

Save it with .html or .htm extension

You will see an html file created with your default browser icon because all html files are by default opened in a browser. An html file can also be opened in a text editor such as notepad but that will only show its html code.

Open that html file in any browser.

However the file will be locally available on that computer only and to make the file globally accessible we need to host an html file on a server.

HTML is a tag language only and it is not a programming language or a scripting language. That means it can only present contents on a web page and cannot do any calculation such as 1+1=2. It does not contain any decision control statements such as if-else, switch, loops, functions etc.

Basic HTML structure

HTML contains elements. Each element has a starting tag as well as an ending tag. Both starting and ending tag is a word or letter enclosed in angled brackets. The end tag is same as opening tag except that the end tag contains a “/” for example.

 <p>this is a paragraph tag</p> 

There are certain tags that does not necessarily need an end tag for example.


The basic structure of an html document is as follows

 <html> <head> </head> <body> </body> <html> 

The <html> tag specifies that it is an html document. The <head> and <body> tag specifies head and body section of page.

The body section normally includes contents of a web page.

The head section includes important tags that we wish to be rendered first, or to be applied to the whole page before rendering contents of web page.

Note that one can put tags specifying contents anywhere in the document even in the head section and it will work just fine. Tags of the head section can also be put in body section and it will work. The head and body section is organizing the structure of document and specifying what must be done first and what next.

The head section normally contains the following tags.

<base> <title> <link> <script> <style> <meta>

<base> tag

A <base> tag specifies the base URL/target for all relative URLs in a page/

 <base href=””> 

<title> tag

A <title> tag specifies the title of a web page that is to be displayed on the tab of a browser window.

If no title is specified the name of html document is displayed.

<link> tag

A <link> tag is used to include an external resource in your web page. For example including an external style sheet, javascript or JQuery file.

 <link href=”featherlitestyle.css” type=”text/css” > 

<script> tag

A <script> tag is used to write client-side script. The default client-side scripting language in many browsers is javascript.

 <script type=”text/javascript” > alert(“Hello”); </script> 

<style> tag

A <style> tag is used to write css code

 <style type=”text/css” > body{color:red;} </style> 

<meta> tag

<meta> tag helps search engines to index a page.

 <meta name=”keywords” content=”html” > 

We will discuss the tags in detail in later articles.

« Prev Article


Next Article »

Ads coming soon.