HTML stands
for Hyper Text Markup Language. It is the basic markup language for creating
web pages
and websites. A HTML web page contains markups or tags that defines how to
display information on the browser’s window.
Advantages
of HTML - Refer
Textbook
Disadvantages
of HTML - Refer Textbook
Tag
A tag in
HTML document is a html element surrounded by angular brackets which has a
specific meaning and task in HTML.
E.g. <html>, <body>, <head>,
<h1>, <br>, etc.
Structure
of HTML document:
<html>
<head>
</head>
<body>
</body>
</html>
A HTML
document has two sections
1) HEAD
section and 2) BODY section
A HTML
file is saved with .html or
.htm extension
<html>
tag :
The
<html> tag represents the root of an HTML document. It is the starting
tag of web page.
It is the
container for all other HTML elements, which are enclosed in <html> ……
</html>
<head>
tag:
The
<head> element is a container for all the head elements.
The
<head> element can include a title for the document, scripts, styles,
meta information, and more. E.g.<title>, <style>, <base>,
<link>, <meta>, <script>, <noscript>
<body>
tag:
The
<body> tag defines the document's body. This is the section which is
displayed on the web page.
The
<body> element contains all the contents of an HTML document, such as
text, hyperlinks, images, tables, lists, etc.
which are
enclosed in <body> …… </body>.
<title>
tag: It defines the
title for the web page. It is written in Head section. The title will be
displayed on the browser window’s title bar.
Formatting
Tags (Physical Style tags)
<b>
... </b>
- To display text in bold.
<i>
... </i>
- Displays text in italics
<u>
… </u>
- To underline the text.
<br>
- stands for break rule. It is used to start a new line. It has no
closing tag.
<tt>
... </tt> –
Displays text in mono spaced font style.
<strong>
... </strong>
– Displays text bold style.
<em>
... </em> –
Defines emphasized text.(browsers displays in italics style).
<mark>
... </mark> –
Displays marked or highlighted text
<del>
... </del> –
Displays deleted or removed text.
<ins>
... </ins> – Defines inserted(added) text.
<sub>
... </sub> –
Defines subscripted text.
<sup>
... </sup> –
Defines superscripted text.
<small>
... </small> –
Reduces the font size of text by 1 unit.
<big>...
</big> –
Increases the font size of text by 1 unit.
<blockquote>...
</blockquote>
– Defines a quoted section.
<font>
... </font> –
Changes the font of the text.
Attributes of <font> tag:
Face – specifies the name of the
font
Size – specifies the size of the
letters values: 1 to 7
Color – specifies the color name or
color code
E.g. <font face=”Arial Black” size=5 color=blue>
Good Morning
</font>
Heading
tags (H1 to H6)
The <h1>
to <h6> tags are used to define HTML headings.
<h1>
defines the most important heading.
<h6>
defines the least important heading.
<h1>
heading is big in size about 1 inch (72
pixels).
Attribute
of Heading tag:
Align –
specifies the alignment for the heading values: left, center, right
The
heading tags are block level HTML elements which means they begin with a
new line.
<p>
tag:
It is used
to indicate a paragraph in a web page. It is a block level html element. It has
the following attributes:
a)
Align - to specify alignment – left, center, right
b)
Style - to
specify css style commands.
c)
Width - to specify horizontal dimension of the
paragraph in pixels.
E.g.
<p align=center width=200>
………. ….
…..paragraph ……………..
</p>
<p style="color:blue;">
………….. paragraph …………….
</p>
<body>
tag
Attributes
of <body> tag:
background – contains the source URL of image
file to be displayed in the background.
bgcolor – specifies the color name or color
code for the background color of the web page.
text – specifies the color for the text
in the web page.
link – specifies the color for the links
in the web page.
alink - specifies the color of an active
link in the web page.
vlink - specifies the color of an visited
link in the web page.
E.g. <body bgcolor=cyan link=green vlink=red>
<body
background="Images/plotters3.jpg">
Comments
in HTML
In HTML to
write comments the following tag is used:
<!-- comments are written here -->
An HTML
comment begins with <!-- and the comment closes with -->.
HTML
comments are visible to anyone that views the page source code, but are not
rendered by a browser. They are not shown on the window.
E.g.
<!--
Author: Mr. XYZ
Description : sample page of showing physical tags
-->