[COMMON HTML TAGS] Introduction to HTML
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">
2 <head> NA defines the document header <head>……..</head> Container Tag
3 <title> NA defines the title of the HTML document <title>……..</title> Container Tag
<body> contains the entire content of a webpage <body>……..</body> Container Tag
bgcolor blue,red,yellow,black,etc white specifies the background color of the web page <body bgcolor="color_name">
background NA specifies the background image of the webpage <body background = "URL of the image">
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">
heading tag Container Tag
<h1> to <h6> Specifies the Heading in a HTML document. <H1> is the
<h#> Heading </h#>
highest size and <h6> is the lowest size
5
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">
1 Prepared By SATYAM JHAWAR
th
Updates on 20 October, 2020
[COMMON HTML TAGS] Introduction to HTML
Horizontal Rule Empty Tag
Tag <hr> it draws a horizontal line through the part of the page to divie
<hr>
the page into two sections
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">
<center> Container tag
9 NA used to align a segment of text in the middle of the web page <center>……..</center>
<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">
Font name list like Times
face New Roman, Monotype Corsiva, this attribute sets the font face for the webpage <basefont face = "Font_Name">
Algerian, Joker
size 1 to 7 3 this attribute specifies the size of the font for the webpage <basefont size = "value">
<font> Container Tag
11 it lets us change the size, color and face of the text segment <font>…….</font>
color Color name black sets the text color for the text <font color = "color_name">
Font name list like Times
face New Roman, Monotype Corsiva, this attribute sets the font face for the text <font face = "Font_Name">
Algerian, Joker
size numerical values this attribute specifies the size of the font for the text <font size = "value">
12 <b> NA used to make the text bold <b>………..</b> Container Tag
13 <u> NA used to underline the text <u>…………</u> Container Tag
14 <i> NA used to tilt the text <i>…………..</i> Container Tag
2 Prepared By SATYAM JHAWAR
th
Updates on 20 October, 2020
[COMMON HTML TAGS] Introduction to HTML
Comments Empty Tag
starts with
<!-- (Comment) used to insert command in the source code. Comments are
15 ends with --> NA <!-- (Comment) -->
not displayed in the browser.
3 Prepared By SATYAM JHAWAR
th
Updates on 20 October, 2020
Copy protected with Online-PDF-No-Copy.com