Page 149 - Computer Genius Class 06
P. 149
Rules for Writing HTML Codes
There are certain rules or riting T codes. ets us learn more a out them
ontainer tags should al ays e closed properly.
alues gi en to the attri utes should e enclosed ithin the dou le uotes.
Tag name should not contain spaces.
There should e no spaces et een and in a tag.
Tags must e nested correctly.
HTML Tags and Attributes
n the pre ious class you ha e learned arious tags such T T T and .
ou ha e also learned attri utes o these tags. et us re ise some o those tags and learn a out
more tags o T .
Tags Description
The T tag tells the e ro ser that the te t contained et een T
T
and T is a e page and can e ie ed using a e ro ser.
The tag represents the header area o the document. t contains in ormation
a out the document title scripts and style definitions used in the document.
The T T tag represents the title o the document and is used inside the
T T tag. t appears on the title ar o the ro ser indo . you do not ant to gi e
title to your e page you can s ip it.
The tag defines that section o the T document hich is isi le on
the e ro ser. t contains all other tags that define the content presentation
elements such as images lists ta les te t and lin s to mo e et een the e pages.
T pro ides different types o tags. For e ample tag to create different types o headings to
create a paragraph to insert a line rea to add a hori ontal line etc. et us learn a out some o
them in detail.
The <Hn> Tag
ery chapter in a oo has arious headings and su headings. These are no n as le els o
headings. T can define up to le els o headings rom 1 to . 1 is the first le el o heading
and is the last le el o heading su heading. et us create a e page using heading tags.
Introduction to HTML 147

