Basic HTML Tags
Basic HTML Tags
Sl No. Tag Attribute Attribute Values Default Value Description/Purpose Syntax Type of Tag
<html> Container Tag
1 used to mark the beginning of an HTML document <html>……….</html>
lang en,fr,sp,etc. English(en) used to indicate the language the HTML file is written in <html lang = "value">
3 <title> NA defines the title of the HTML document <title>……..</title> Container Tag
LINK blue,red,yellow,black,etc blue specifies the color of all the links in the document <body link = "color_name">
4 ALINK blue,red,yellow,black,etc red specifies the color of all the active links in the document <body alink = "color_name">
VLINK blue,red,yellow,black,etc violet specifies the color of all the visited links in the document <body vlink = "color_name">
TEXT blue,red,yellow,black,etc black specifies the color of the text in the document <body text = "color_name">
TOPMARGIN numerical values 0 sets the top margin of the web page <body topmargin = "Value">
LEFTMARGIN numerical values 0 sets the left margin of the document <body leftmargin = "Value">
align left,center,right left specifies the horizontal alignment of the heading <h# align = "value">
line break tag It is used to shift the text to a new line without inserting a Empty Tag
6 <br> NA <br>
blank line in between
paragraph tag This tag is used to offer a way to structure our text in the form Container Tag
7 <p> <p> Paragraph Tag </p>
of paragraphs.
align left,center,right left <p align = "value">
size Numerical Value specifies the size of the horizontal rule <hr size = "Value">
Numerical Value
8 width specifies the width of the horizontal rule <hr width = "Value">
(mostly percentage)
color Color name black specifies the color of the horizantal rule <hr color = "color_name">
specifies that the horizontal line should render in one solid
noshade <hr noshade>
color
align left,center,right specifies the alignment of the line <hr align = "alignment">
<basefont> this tag is sued to define the basic size, colour and face of the Empty Tag
10
font of a webpage
color Color name black sets the text color for the webpage <basefont color = "color_name">
size 1 to 7 3 this attribute specifies the size of the font for the webpage <basefont size = "value">
color Color name black sets the text color for the text <font color = "color_name">
size numerical values this attribute specifies the size of the font for the text <font size = "value">