HTML Tags

Tags are the bones of an HTML document. They tell the browser what effect is to be applied on the contents following a tag. Each tag has a specific effect associated with it.In addition, a tag may also contain attributes, which provide additional information to the browser program. Before we start discussing basic HTML tags,it is necessary to understand the structure of HTML tags.

Structure of HTML Tags

Every HTML tag consists of a tag name, sometimes followed by an optional list of attributes, all placed between opening and closing angle brackets ( ).
Each tag has certain attributes associated with it, which are called tag attributes. Tag attributes, if used, are given after the tag name but before the closing angle bracket each separated by one or more tab, space oe line feed characters. Tags attributes may appear in any order within the tag.
Tag names and their attributes are not case sensitive, i.e. they may be written in any type of letters. But for convenience, we will write tag names in capitel letters and attributes names in small letters.
Each attribute generally has a value, which is written after the equal sign (=) following the attributes name. For example, following are some attributes:

By the above example, it is clear that generally attributes values are wretten without any quotation marks, but if an attributes value contains more than one word, than you have to bound them within quotation marks. The lenght of an attributes value is limited to 1024 character.

The attractiveness of your web page depends on the tags and thier attributes. Attributes associated with a particular tag will be explained in following sections, when we discuss that tag.We start with very first tag, i.e. HTML tag.

HTML Tag:-

Tagtag identifies the document as an HTML document.An HTML document begins withtag and ends withtag, such as: ………. HTML document lines The container element bound by theandtags contains the complete HTML document. This tag does not have any effect on appearance of the web page. This tag is used only to mark the document as an HTML document. This informs the browser and other programs that this is an HTML document. This tag may contain two attributes associated with it: Dir and Lang.

DIR Attribute

Dir attribute oftag specifies in which direction the browser should present the text within the whole document.This attributes can have one of two values:ltr (left-to-right) and rtl (right-to-left).By default the value of this attribute is ltr.The value rtl is used for languages written from right to left like urdu, chinese or hebrew. Example :

LANG Attribute

The LANG attribute oftag specifies the languag, you have genrally used within the document.Web pages can be designed in many language e.g.,french,german,hindi,etc.using different fonts. The LANG attribute value spcifies this base language. For example, en denotes English language and fr denote French Language. Example:-

<HTML lang = en>