Thursday 27 June 2013

INSERTING IMAGES

Just like different fonts and lists can be added in an HTML document, graphics can also be added to make the document look more attractive. There are a number of formats for graphics that are supported by web browsers. The most widely used formats amongst them are:

1. GIF (Graphics Interchange Format): GIF format is the best format used for displaying images that have been designed using a graphics program. This format uses a maximum of 256 colours and a combination of these to create more colours.

2. JPEG (Joint Photographic Expert Group) format: JPEG format is the best format for photographs as it contains 1 million colours.....
IMG [Image] Tag
The <IMG> tag specifies an image to bedisplayed in an HTML document. The image can be inserted in an HTML document by
<IMG
SRC = image - URL
ALIGN = alignment
BORDER = border width - value
HEIGHT = height - value
WIDTH = width - value
ALT = text>
Shows the various attributes of the <IMG> tag

The following HTML code will help you understand the <IMG> tag. The output of this code is shown...

NESTING LIST

HTML allows nesting of lists, i.e., any kind of list can be nested inside any other list. For example, an ordered list can be nested within an ordered list, or an ordered list can be nested within another ordered list.

The following HTML code shows how nesting of lists works. The output of this code is shown.......


CREATING LISTS

HTML support several types of lists elements that are include within the BODY tag of the documents. These elements may be nested, i.e., one set of elements may be embedded within another set of elements.

List item <LI> Tag

A list item tag <LI> is used to defined each item of a list.
This tag is an empty tag i.e., it has an ON tag but does not required an OFF tag. Once the items are defined using the <LI> tag the list (by default) appears in bullet form in the web browser.
Let us type the following HTML code to see how the <LI tag works. The output  of the code is shown.




Unordered List <UL> Tag

An unordered list is used for items in which the ordering is not specific.
The list items are defined using the <UL> and</UL> tags.

Each item in the unordered list is defined using the <LI> tag. The bullet style can be added to the list items by
<UL TYPE = 'CIRCLE' / 'DISC' / 'SQUARE'>

where, circle specifies a hollow bullet; disc specifies a solid round bullet; and square specifies a square bullet. An unordered list is also called a bulleted list.
The following HTML code will explain the working of the <UL> tag. The output is shown.....

Ordered List <OL> Tag

An ordered list defines a list of items in which the order of items is taken into account. The list items are enclosed by <OL> and </OL> tags. The ordering here is rendered bya numbering scheme, using Arabic numbers, letters or Roman numerals. An ordered list is also called a numbered list.

The numbering scheme can be applied by
<OL START = 'Value' TYPE = 'A' / 'a '/ 'i' / 'I' / '1'>
where 'Value' specifies the first number is the list; and 'A', 'a', 'i', 'I', '1' specify the type of numbering to be used for the list items.

The following HTML code will explain the working of the <OL> tag. The output is shown.....


Defiinition List <UL> Tag

The definition list tag is used to built a list of items, where each item has some block of text acting as a definition. The tags used for creating a definition list are:
<DL> - Definition List
<DT> - Definition List Term
<DD> - Definition List Description

The following HTML  code will make the working of definition list tag clear. The output of the code is shown .......

..







Tuesday 25 June 2013

FONT TAG

The FONT tag in HTML is used to specify the size, colour, and font of the text it encloses. The FONT tag is a container element, i.e., it has both an ON tag and OFF tag.

In HTML 4.01 the FONT tag has been deprecated, which means it has been marked to be phased out in the coming versions. Instead the STYLE tag will be used to specify fonts, their colour, etc..

lists the various attributes of the FONT tag....


Let us write the following HTML code in notepad and see its output in the web browser....

Bold, Underline, and Italic tags

Thr Bold tag is used to mark the text as bold. It is a container element.
For example,
This text is <B>bold</bold>

The underline tag is used to underline the text. It is a container element
For example,
This text is <U>underlined</U>

The Italic tag is used to make the text italic . It is also a container element.
For example,
This text is <I>italic</I>

You can alsocombine these tags. For example, if you wish to underline text and also make it bold, you can write it as
<B><U>This text is bold and underlined </U></B>

HEADING TAG

HTML defines six level of headings. The HEADING element can be used to give section headings. It is a container element. It is written as
<Hn> ... </Hn>

Where n is the level of the heading , which can take values from 1 to 6. Let us consider an example. Type the following HTML code in notepad, save the document as an HTML file, and open it in a browser.

COMMENT ELEMENT

Amy text place between the <COMMENT> and </COMMENT> tags will be ignored by the browser. It helps in editing or viewing the HTML code of a web page..
<COMMENT> ..... </COMMENT>
You can also use the combination of symbols
!-
and
-
to create a comment. Let us considered an example. Type the following HTML code in notepad, save the document as an HTML file, and open it in a browser......
HTML CODE