Ekayanaa School, Indore
Class VII computer
More on HTML 5
Important Tags and their uses
Basic Structure of HTML document
1) <BODY>
It contains the contents of your document.
Bgrcolor attribute is used to change the background colour of the webpage
Eg: <Body bgcolor=green>
2) Heading Tags
There are 6 heading tags. <H1> to <H6>
<H1> displays the text in largest size and <h6> displays in smallest size.
Eg: <H1>My first Webpage</H1>
3) <P> - Paragraph tag
The <p> tag defines a paragraph.
Eg: <P>HTML stands for HyperText Markup Language. It is used to design the web pages. With the
help of HTML, you can create a complete website structure. HTML is the combination of Hypertext and
Markup language.</P>
4) <BR>
It splits the line and displays the text on a newline.
5) <HR>
It draws a horizontal line across the webpage.
6) <B> , <I> , <U> -To display the text in Bold, Italics and Underline.
Eg: Welcome to <B> HTML </B>
7) Ordered list -<OL> :- It is used to create numbered list
<OL>-…</OL> to start and end the list
<li> To display list item
Attribute of ol tag – 1) start
2) reversed
3) type (can be like A/a/I/i/1) default is 1
Ex. - <ol start = 5 reversed >
Eg.
<body>
<h1> Stationary items
<ol start = a>
<li> pen
<li> pencil
<li> Eraser
</ol >
8) Unordered list - <UL> :- It is used to create bulleted list
Its attributes - type (it can be disc , square , circle ) default value is disc
Eg. <body>
<h1> Stationary items
<UL type = “square” >
<li> pen
<li> pencil
<li> Eraser
</UL >
9) Definition List - <DL> :- It is used to create a list consists of a term followed by its definition.
It starts with <DL> tag
<DT>- Data Term
<DD>-Data Definition
Eg. <body>
<DL>
<DT> Keyboard
<DD> An input device
<DT>Monitor
<DD>An output device
</DL>
10) <Table> tag- To create tables
<TR> - Table Row
<TD> -Table Data
<Caption> To give a heading/caption for the table.
Attributes of <Table> tag-
Border- To give a border for the table
Bgcolor – To give background colour for the table
height & width - To change the height and width of the table
Eg.
<table border=2 height=20% width=20%>
<tr>
<th>Rollno</th>
<th>name</th>
<th>Class</th>
</tr>
<tr>
<td>1</td>
<td>Maria </td>
<td>8</td>
</tr>
<tr>
<td>2</td>
<td>Chirag</td>
<td>7</td>
</tr>
</table>
11) <IMG> tag – To insert images in the webpage
Attrinutes-
SRC – to add the source(location) of the image
ALT- To specify an alternate text to the image
Height & width- To increase the height and width of the image
Eg.
<IMG src=” C:\Users \Downloads\imagename.jpg”>