Short Description about All Basic HTML Tags

“Welcome back to WoBS. I hope you liked my previous article and my first video on my YouTube channel. Those were based upon the basics of HTML and the foundation tags like the HTML tag, etc. But what about other tags? A short description of these tags with their usage areas is given in this article. The YouTube video has got the same with an exemplary document upon using the other basic tags which can dramatically beautify your page.”

A BRIEF SUMMARY OF HTML

  • HTML tags(strings enclosed within angular brackets) are predefined and not case-sensitive.
  • The text between these angular brackets are called elements.
  • In the case of container tags, the ON tags are written regularly whereas for OFF tags, the element is written after a forward slash(/) inside the angular brackets.
  • The attributes are always written after giving a space after the element of the ON tag.

Now, let’s proceed to describing all the basic tags…

Jump to…

  1. ATTRIBUTES of HTML TAG
  2. ATTRIBUTES of BODY TAG
  3. ATTRIBUTES of FONT and BASEFONT TAGS
  4. ATTRIBUTES of HEADING and PARAGRAPH TAGS
  5. ATTRIBUTES of HORIZONTAL RULE TAG
  6. ATTRIBUTES of UNORDERED LIST TAG
  7. ATTRIBUTES of ORDERED LIST TAG
  8. FONT and BASEFONT TAG
  9. CENTER TAG
  10. COMMENT TAG
  11. HEADING TAGS
  12. PARAGRAPH TAG
  13. LINE BREAK TAG
  14. HORIZONTAL RULE TAG
  15. STYLE TAGS
  16. UNORDERED LIST TAG
  17. ORDERED LIST TAG
  18. DEFINITION LIST TAGS
  19. MARQUEE TAG

…or begin from the beginning;
We had already learnt about the basic foundation tags in my previous article. Now let’s learn their attributes and some more tags.
Attributes are the special characteristics determined for a particular tag by placing it within the angular brackets of the ON tag after the element(by giving a space). One can put multiple attributes by leaving space between them within the same angular brackets. The syntax of an attribute is

<element attribute=”value(text/number- according to the tag and attribute)”>

</element> 


ATTRIBUTES OF HTML TAG

dir

This attribute specifies the DIRection of the displaying of characters on the page.
It has the following two values:

ltr
left-to-right
Syntax: <html dir=“ltr”>…</html>

or

rtl

right-to-left
Syntax: <html dir=“rtl”>…</html>

lang

This attribute of HTML tag specifies the id or name of the main language* of the page.
*Remember, here, the language means the language in which the author prefers to write. However, the don’t of that language would also be needed to write on that language.
Some popular languages and their lang-attribute codes are as follows:

English
en
Syntax: <html lang=“en”>…</html>
Hindi
hi
Syntax: <html lang=“hi”>…</html>
Arabic
ar
Syntax: <html lang=“ar”>…</html>
Chinese
zh
Syntax: <html lang=“zh”>…</html>
German
de
Syntax: <html lang=“de”>…</html>
Greek
el
Syntax: <html lang=“el”>…</html>
Dutch
nl
Syntax: <html lang=“nl”>…</html>

ATTRIBUTES of BODY TAG

background

It is used to give the BACKGROUND of the page as an image. The value is same as that of the src attribute of img(image*) tag, i.e., the URL of the image.
Syntax: <body background=”[image URL]”>…</body>
*”I shall post an article related to the use of img(image) tag very soon.”

text

It is used to define the color of the text to be followed throughout the body(except links**).
Its value can simply be the name of the color or the colour’s hexadecimal/RGB codes.
Syntax: <body text=”[color’s name(proper spelling)/hexadecimal code/RGB value{rgb(x^,y^,z^)}]>…</body>
**”I shall also post about linking very soon.”
^Here x means Red value, y means Blue value and z means Green value of the color.

bgcolor

If you want your background to be like a smooth painted wall, then you must use this attribute. Again, since it is a kind of color attribute, the value can be pepper spelling of the colour/its hexadecimal code/its RGB code.
Syntax: <body bgcolor=”[colour’s name/hexadecimal code/RGB code]”>…</body>

link

The pieces of text or media which are linked and thus take to another piece of content on being clicked, are called links.
This attribute specifies the colour in which the links would appear on the page, so that the people are able to distinguish it. That means that those “clickable” items can be assigned different colours for making sure they’re visibility!
Syntax: <body link=”[colour’s proper spelling/hexadecimal code/RGB code]>…</body>

alink

When a link is clicked, it becomes active while it is being loaded or animated and thus becomes an active link. The colour of active links can be modified using this attribute.
Syntax: <body alink=”[colour’s name/hexadecimal/RGB code]”>…</body>

vlink

When a link has been visited and the corresponding page has also been visited, that link becomes a visited link, colour of which can be changed using this attribute.
Syntax: <body vlink=”[colour’s name/hexadecimal code/RGB code]”>…</body>

topmargin

Top margin is the distance between the top of the browser window and the top of the document. So this attribute is used to specify that distance(as it’s value).
Syntax: <body topmargin=”[value]”>…</body>

leftmargin

Left margin is the distance between the browser’s left edge and the document’s left side. Using this attribute(similar to the topmargin) one can set the left-hand margin for the body element.
Syntax: <body leftmargin=”[value]”>…</body>

ATTRIBUTES of FONT and BASEFONT TAG

Both of these tags are actually same, with a li’l difference in the range of affecting.
Font tag is used to enclose a piece of text within its ON and OFF tag and thus affect only that content.
Since it is a container element, the OFF tag is also compulsory; otherwise compiler would put OFF tag by itself- somewhere you won’t want it to!
Syntax: <font>…</font>
Basefont tag is used to modify the whole content*. It is a non-container element, so OFF tag is not necessary.
Syntax: <basefont>
*Basefont tag modifies all text in the document except those which are specially modified using font tag.

Both of these have same basic attributes, which(along with the value) can be used after font and/or basefont element to specify the formatting.

size

Use it AS IT IS USED*, with the element.

face

It is to specify the font’s style. One can have a reference of his/her favourite font and its correct spelling, to apply as the value of this attribute.

color

Just like the color attribute in other elements(where it is used), here also it is to modify the colour. But this would be the colour of font(letters and characters in the document).
Its syntax is also the same(like the bgcolor, link, etc. color attributes), but here it used with font or basefont element(see the syntax of each of them).
Check the syntax of the bgcolor attribute of body tag to learn about the value to be assigned to this attribute.



THIS POST IS UNDER-DEVELOPMENT.
“I hope this post could prove HTML programming a bit easier.”
You can mail me your suggestions, ideas and requests for new posts to my email through the links given below:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s