Additional content - HTML
Additional content - HTML
HTML TAGS
Tag Name Example Definition
Structure of a web document HTML stands for hypertext
<html> markup language. it is a
Hyperte <head> complete code package that
<html xt <title> Title of your web page</title> enables a user to create web
> markup </head> pages containing both text
languag <body> and graphics It describe the
e HTML web page contents structure and behavior of a
</body> web document. All the web
</html> browsers are designed to
understand and interpret this
language
Heading of <head>Contains elements describing The head section provides
<head> Html the document</head> general information about the
document document for example title
defines the title of a page on
the Browser's title bar
Docume <title>Title of your HTML The title tag is to be given
<title> nt page</title> within the head tag. It
Title contains the title of the
document. The title is
displayed on the title bar at
the top of the browser
window and not inside the
window itself, the title should
be short and include less than
64 Chapter -aracters
Body of <body>The content of your HTML The body section contains the
<bod Html page</body> text whiChapter - gets
y> docume Attributes: bgcolor, text, background displayed on the web page
nt Bgcolor- specifies the background color along with the other text and
of the attributes that includes text
webpage. <Body bgcolor=”red”> graphics and other HTML
Text-specifies the text color of the elements that provide control
webpage and formatting to a page like
<Body text=”green”> font paragraph list and other
Background-specifies the path/name of elements
the image to set as a background.
<Body background=”lotus.jpg”>
CAMBRIDGE SCHOOL SRINIVASPURI NEW DELHI
<h1> Heading <h1 align=”center”>Heading 1</h1> The heading tag is used to define
<h2> 1 <h2>Heading 2 </h2> different heading levels in HTML
<h3> heading <h3>Heading 3 </h3> document it is basically used to
<h4> 2 <h4>Heading 4 </h4> emphasize the text they are six
<h5> heading <h5>Heading 5 </h5> heading levels H1 to H6 . The
3 <h6>Heading 6 </h6> H1 heading style displays the
<h6>
heading Attribute: align Values: text in the largest size and is
4 left(default), center, right mainly used for main heading the
heading lower level are used for
5 subheadings and less important
heading things .These heading tags are
6 written within body tag of the
document
<p> Paragraph To display a long piece of text on
a web browser paragraph
<p> Kips Learning Solution</p> element is used which marks a
<p align=”right”> Kips Learning block of text as a paragraph to
Solution</p> mark the end of the paragraph </
Attributes: left(default), center, right, p> element is used. When you
justify start another paragraph web
browser will leave one line
between the two paragraphs
<br> Line break The contents of your page<br>The The BR tag inserts a single line
contents of your page break. The BR tag is an Empty tag
which means that it has no end
Tag
<hr> Horizontal <hr> It is used as a separator between
ruler It draws a horizontal line across the page. blocks of text the HR element
Attributes: width, size, color, align. draws a horizontal line across the
Width- specifies how long the horizontal page. It is an Empty element that
rule would be. Value can be given in has no end tag. Type HR where
percentage or pixels. Size- specifies the you want to insert horizontal line
width or thickness of the horizontal line. in between the text.
Value is specified in pixels(number)
Color- Any color name
Align- Specifies the alignment of the
horizontal rule.
Values are : Center (default), left, right.
It is used to write notes for yourself in window in such a case you need
an HTML document, which we do not to use the comment tag.
want to display in the browser.
<b> Bold It is used to emphasize the text The bold tag is used when you
<b>Example</b> need to emphasize the text type
<b> before typing the text that
you want to display as Bolt and
type </b> after the text
<i> Italic <i>Example</i> To draw the attention of a
reader on important information
italics element is used this
element marks up the text in
Italic style type. Type <I> before
typing the text that you want to
display in italics and type </I>
type after the text
<u> Underlin <u>Example</u> Underline tag is used to
e underline the text that is
selected. Type <U> before
typing the text that want to
underline and </u> after the text
<font Font <font face="Times New
> Roman" size="4"
color=”red”> Example The font tag
</font> specifies the font
Note: The value of size ranges between ‘1’ face font size and
and ‘6’. color of the text
<cent Center <center>This will center your Centre tag is used to align the
er> contents</center> text towards the center of the
webpage