| Next Tip?
Home » HTML, Tutorial

HTML -A Step Ahead Series Part IV

15 December 2008 152 views No Comment
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3.00 out of 5)
Loading ... Loading ...

Greetings!!!

Let us move further to other tags. Stating with the Line Break Tag.

Line Break Tag:–

Syntax:– <br/> or <br>

Type:– Empty Tag End Tag not required.

Purpose:– This tag is used when we want to break the line in the same paragraph but not wanted to break the whole paragraph..

Example:– Line one goes here <br/> line two starts from here

Attributes:– No special attribute is for line break

Moving further towards the horizontal rule tag:

Horizontal Rule Tag:-

The tag is used to give a horizontal line in the page

Syntax:– <Hr/>or <Hr>

Type:– Empty Tag.

Purpose:– This tag draws a horizontal rule in the page.

Example:– Some Text Above Line<hr> Some Text Below Line

Optional Attributes:– Following are the attributes of the Heading Tag

1. Align
* Values:- Left, Right, Center
* Purpose:- to align the line. Deprecated. Use styles instead
* Example :– <Hr align=”Right”/>
2. Noshade
* Values:-noshade
* Purpose:-When set to true the rule will render in a solid color, when set to false the rule will render in a two-color “groove”. Deprecated. Use styles instead
* Example :– <Hr noshade/>
3. size
* Values:- pixels
* Purpose:-Specifies the thickness (height) of the horizontal rule. Deprecated. Use styles instead
* Example :– <Hr size=”5″/>
4. width
* Values:- pixels %
* Purpose:-Specifies the width of the horizontal rule. Deprecated. Use styles instead
* Example :– <Hr width =”5%”/>

Differences Between HTML and XHTML

In HTML the <hr> tag has no end tag.

In XHTML the <hr> tag must be properly closed.

All “optional attributes” of the hr element were deprecated in HTML 4.01.

All “optional attributes” of the hr element are not supported in XHTML 1.0

Comments in HTML

Syntax:– <!–……………..–>

Type:–

Purpose:– The comment tag is used to insert a comment in the source code. A comment will be ignored by the browser. You can use comments to explain your code, which can help you when you edit the source code at a later date.

You can also store program-specific information inside comments. In this case they will not be visible for the user, but they are still available to the program. A good practice is to comment the text inside the script and style elements to prevent older browsers, that do not support scripting or styles, from showing it as plain text.

Example:–<!– This is the Commented Text–>

This ends with the Basic HTML Tags… In the Next Class We Will Start With The Character Formatting Tags.

==
Thanks and Regards
Meetu Choudhary

Popularity: 1%

Post to Twitter Tweet This Post

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Ads by Lake Quincy Media

Leave your response!

You must be logged in to post a comment.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes