HTML head tag

As we have already seen the structure of html document. The root of the document is html tag then there are two child tags head and body.
Head tag contains meta data of a web page like title, meta,link,base.



HTML Bold Italic & Underline Tags

For creating bold Itelic and Underline text we use following syntax.
We can also use nesting of tags



This is bold text
This is italic text
This text is underline
This is bold and italic text

HTML 5 Document Structure

General HTML 5 Document Structure is as below

<!DOCTYPE html> specifies that this document is html 5 document and you can use all html5 tags here.

<html> is root tag of html document it contains two child tags <head> and <body>

<head> specifies that this portion contains heading information of page we can use many other tags here like <title> which is used to specify the title of page and may other.

<body> we put the contents which you would like to display on browser.
Inside body tag we use many different html tags to proper formatting the data.

HTML logo png

Find HTML5 LOGO Here



In above syntax start and end tags are optional.

if you dont want to use any attribute with root tab ie <html lang=”en”> then you can omit this

So syntax with out root tag

Exampe of html document


In the XHTML syntax we have to specify the xmlns to declare that it is a HTML namespace.

We can use lang or xml:lang attribute to specify the language

Syntax with xmlns



Read More

  1. HTML Image Tag

HTML pre tag

The pre tag is used to display preformatted text in HTML document. pre tag preserves the content structure it can be used to show pre-formated data stored in the database and in another documents and to show computer codes programs to HTML document.




Pre tag can also be used to represent formatted computer codes like programing language code to show in HTML document like below



HTML br tag

The br tag is used to break the line.
It does not have closing tag.


Hello How are you.

Feeling well.

HTML hr tag

Hr is used to show horizontal line in html document.
When ever we have to give any horizontal row between two element we use this tag
Hr does not have any closing tag.




Hello How are you

Whats going on


HTML provides three types of lists

  1. Ordered List
  2. Unordered List
  3. Definition List

Lets see each list one by one with suitable example.

Ordered List

This list are used to show information where order is important. for this we use ol tag.
inside <ol>..</ol> we use <li> tag.


We can use type attribute to show list number type.

  1. <ol type=”1″ value=”1″> list start with number 1 and its type is numberic
  2. <ol type=”1″ value=”5″> list start with number 5 and its type is numberic
  3. <ol type=”A”>  list start with capital letter A
  4. <ol type=”A” value=”3″>  list start with capital letter C
  5. <ol type=”a”> list will start with small letter a
  6. <ol type=”I”> list will start with capital roman letter
  7. <ol type=”i”> list will start with small roman letter


Unordered List

This list are used to show information where order is not important. for this we use ul tag.
inside <ul>..</ul> we use <li> tag.

You can use type attribute for showing different list market type.
like <li type=”disc”>, <li type=”circle”> or <li type=”square”>


Definition List

To provide terms with definition we use definition list
for using definition list we use <dl>..</dl> tag.
Inside dt tag we use <dt>..</dt> for term to define
For definition(description) of term we use <dd>..</dd>

We can also use nested list means list inside another list of any kind.

HTML Table rowspan and colspan

To span a row more than a single row we can use rowspan attribute.


Group 1 Manish Durg India 
Manoj Bhopal India 

Group 2 Rohit Banglore India 
Nitesh Bhopal India  


Group 1ManishDurg India
ManojBhopal India
Group 2RohitBanglore India
NiteshBhopal India

To span a column more than a single column we can use colspan attribute.


Group 1
ManishDurg India
ManojBhopal India
Group 2
RohitBanglore India
NiteshBhopal India

HTML table tag

We can create a table in html by using <htmt></htmt> tag.
with in table tag we use <tr> to create new table row.
inside tr we use <td> tag to specify data value.
to provide table header <th> tag is used

One table can contain multiple table rows and each row can contain multiple table data.


<th> is optional it is used to provide HTML Table with Header


Sr NoNameCity

For providing data heading we use <th> tag

HTML Table with border

In above table we have not provided table border to provide HTML table with border we can use border attribute with border tag as below

table border=" 1|0"

0 specify no border around the table
1 specify border around the table

HTML Border attribute in not support by HTML 5.

Insted of border attribute use CSS.

User NameMailid
Ram[email protected]
Mohan[email protected]
Shyam[email protected]

HTML Table border with CSS

HTML Table With Caption

To provide table caption <caption> tag is used is should be used below the <table> tag

User Name and Mailid details of user
User NameMailid
Ram[email protected]
Mohan[email protected]
Shyam[email protected]

HTML Table Grouping Tag

<thead>, <tbody> and <tfooter> tags are used for grouping table rows <thead> is used to group table header

<tbody> is used to group table body
<tfooter is used to group table footer

Q Which tag allows you to add a row in a table?

tr rag allows us to add a row in a table

Q Can a data cell contain images in html

yes We can include images in HTML data cell

Q what is the use of “border ” attribute of table tag?

“border ” attribute of table tag is used to set table border