HTML Overview

HTML stands for Hyper Text Markup Language, and it's mostly used to developed web pages and website.

Hyper Text means 2 document are linked together. The link available on webpages is called hypertext.

Markup Language means it's "markup" language, that means you don't need to compile this code, direct write code in file and open this file in browser and you can get output.

Now a days HTML widely used to design web pages with many different tags.

Sample HTML Code

You can see below example of HTML document

<!DOCTYPE html>
<html>

   <head>
      <title>This is document title</title>
   </head>

   <body>
      <h1>This is a heading</h1>
      <p>Document content goes here.....</p>
   </body>

</html>

You can see above example code output as below

HTML Tags

HTML is a markup language and create the web pages you used tags in code. HTML tags are enclosed with angle braces starting tag <Tag Name>, closing tag </Tag Name>.

Below you can see some basic tags for HTML web pages.

Tag

Description

<!DOCTYPE>

This tag is used to define document type of HTML pages.

<html>

This tag is main tag of HTML pages, all other code written between this tag.

<head>

This tag is used to set the document header information for web pages.

<title>

This tag is used to set the document title.

<body>

This tag is used to set the main part of HTML web pages. You can write all document code which display on website write here.

<h1>

This tag is used to display text as heading format.

<p>

This tag is used to display text in paragraph format.

HTML Document Structure

Mainly HTML document structure as below format

<html>
   <head>
      Document header related tags
   </head>

   <body>
      Document body related tags
   </body>
</html>

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used to understand the version of HTML document. If you want to write code in HTML 5 version the you can used below code

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document which you required.