You are on page 1of 5

HTML

HTML is a markup language. Writing in a markup language is very simple, directly


you start the text of your web document and add special tags around words and
paragraphs. The tags are coded by HTML commands or keywords that indicate how
web browser should format and display the content.

HTML is made up of tags and its attributes. Tags are known as elements of HTML.
Additional information such as colour, alignment etc., can be included with an HTML
tag is known as attribute. Attributes are used to improve the appearance of an HTML
document. You cannot create your own tags to create a new style or feature. HTML
stands for Hypertext Markup Language used to create web pages with text,
graphics,sound, and video. HTML is the language interpreted by a Browser. Web
pages are called HTML documents.

Every web document has two sections viz. Heading Section and Body Section. The
heading section is used to show the title of a webpage in title bar or tab heading in
browser. The head section should begins with <head> tag and end with </head> tag.
The tag <title> is used to specify the title of the webpage.

The body section is used to display the main content on the browser window. The
body section should defined within <body> and </body> tags. Whatever the text you
specify between these tags will display on the browser window.

HTML Tags
Tags are Instructions that are embedded directly into the text of the document.
A tag is a keyword enclosed by angle brackets
( Example: <i> )
There are opening and closing tags for many but not all tags; The affected text is
between the two tags
HTML tags can be of Two types
Singular Tags or Stand alone tag
Paired Tags
Singular Tag
A singular tag does not have a companion tag.
Example:
<BR> - insert a line break.
Paired Tags The opening and closing tags use the same command except the closing
tag contains and additional forward slash /
For example, the expression <B> Welcome </B> would cause the word ‘Welcome’ to
appear in bold face on a Web page

Nested Tags Whenever you have HTML tags within other HTML tags, you must close
the nearest tag first
Example:
<H1> <i> The Nation </i> </H1>

TABLES
Aligning Cell Content
By default, a cell’s content are aligned horizontally to the left and and vertically in the
middle.
Use VALIGN=direction to change the vertical alignment, where “direction” is top,
middle, bottom, or baseline
Use ALIGN=direction to change the horizontal alignment where “direction” is left,
center, or right

Controlling Cell Spacing


Cell spacing is the space between cells while cell padding is the space around the
contents of a cell
To control both types of spacing, use the CELLSPACING =n and CELLPADDING=n
attributes in the <TABLE> tag
Changing a Cell’s Color
To change a cell’s color, add theMBGCOLOR=“color” attribute to the <TD> tag
Example:
<TD BGCOLOR=“blue”>

Centering a Table
There are two ways to center a table
Type <TABLE ALIGN=CENTER>
Enclose the <TABLE> tags in opening and closing
<CENTER> tags

COLSPAN Attribute
It make the cell to take up more than one column. To span a cell across many
columns, type <TD COLSPAN=n>, where n is the number of columns to be spanned.
Eg:
<tr>
<th colspan=“3”> marks </th>
</tr>

ROWSPAN Attribute
It allows a cell to take up more than one row. To span a cell across many rows, type
<TD ROWSPAN=n>, where n is the number of rows to be spanned.
Eg:
<tr>
<th rowspan=“2”> name </th>
</tr>
FRAMESET TAG

The HTML tag that divide a browser screen into two or more HTML recognizable
unique region. Each unique region is called a Frame. Each frame can be loaded with a
different document and hence allow multiple HTML documents to be seen
Concurrently.
It has 2 Attributes.
Rows
– Divide the screen into multiple rows.
Cols
- Divide the screen into multiple columns.
Example:
<frameset rows=“30%,*”>
<frameset cols=“50%,50%”>
……
…..
</frameset>
</frameset>

FRAME TAG

Once the browser screen is divided into rows(Horizontal section) and columns
(Vertical section), each unique section defined can be loaded with different HTML
documents.
It takes the attributes of
Src – indicate the url of the document to be loaded.
Name – give a unique name so it can be targeted by other documents.
Example:
<frameset rows=“30%,*”>
<frameset cols=“50%,50%”>
<frame src=“one.html”>
<frame src=“two.html”>
</frameset>
<frameset cols=“50%,50%”>
<frame src=“file1.html”>
<frame src=“file2.html”>
</frameset>
</frameset>

Targeting Named Frames

The frame in which the HTML file is to be opened needs to be named using the
NAME attribute of the <FRAME> tag.
Eg:
<frameset cols=“50%,50%”>
<frame name=“part1”>
<frame name=“part2”>
</frameset>

Target Attribute:
It is a part of an <A> …… </A>tag. It helps to specify the frame name.
Target = “frame name”
Eg:
<a href=“index.html” target =“main”>visit </a>

You might also like