Text Formatting Tags

Text Formatting Tags                                                                          In the...


Text Formatting Tags

                                                                        
In the following table, some Text formatting tags are listed:

Tag                                   Description

<html>                                     Defines an HTML document

<body>                                    Defines the document's body

<h1> to <h6>                            Defines header 1 to header 6

<p>                                         Defines a paragraph

<br>                                        Inserts a single line break

<hr>                                        Defines a horizontal rule

<!-->                                       Defines a comment

<b>                                         Defines bold text

<big>                                       Defines big text

<i>                                          Defines italic text

<small>                                    Defines small text

<sub>                                      Defines subscripted text

<sup>                                      Defines superscripted text

<strike>                                   Deprecated. Use <del> instead

<u>                                         Deprecated. Use styles instead

         Character Entities:

Some characters have a special meaning in HTML, like the less than sign (<) that defines the start of an HTML tag. If we want the browser to actually display these characters we must insert character entities in the HTML source.

A character entity has three parts: an ampersand (&), an entity name or a # and an entity number, and finally a semicolon (;).

To display a less than sign in an HTML document we must write: &lt; or &#60;

The advantage of using a name instead of a number is that a name is easier to remember. The disadvantage is that not all browsers support the newest entity names, while the support for entity numbers is very good in almost all browsers.

Note that the entities are case sensitive.

The Most Common Character Entities:

Result                  Description                               Entity Name                                   Entity Number
                            Non-breaking space                   &nbsp;                                               &#160;
<                          Less than                                   &lt;                                                    &#60;
>                         Greater than                               &gt;                                                   &#62;
&                         ampersand                                 &amp;                                                &#38;
?                          Quotation mark                          &quot;                                                &#34;
'                           apostrophe                                &apos;(does not work in IE)                  &#39;  

Some Other Commonly Used Character Entities:

Result                  Description                               Entity Name                                   Entity Number
©                           Copyright                                  &copy;                                               &#169;
®                           registered trademark                 &reg;                                                 &#174;
£                           pound                                        &pound;                                             &#163;

The Anchor Tag and the href Attribute:

HTML uses the <a> (anchor) tag to create a link to another document.

An anchor can point to any resource on the Web: an HTML page, an image, a sound file, a movie, etc.

The syntax of creating an anchor:
<a href="url">Text to be displayed</a>
The <a> tag is used to create an anchor to link from, the href attribute is used to address the document to link to, and the words between the open and close of the anchor tag will be displayed as a hyperlink.

This anchor defines a link to a blog:
<a href=”http://www.durgapuja-inpic.blogspot.com” target=”_blank” >Visit My Blog</a>


With the target attribute, you can define where the linked document will be opened. The above line will open the document in a new browser window. There are four values for target attribute. i.e.

  1. _blank - the target URL will open in a new window
  1. _self - the target URL will open in the same frame as it was clicked. Frame will be discussed later.
  1. _parent - the target URL will open in the parent frameset
  1. _top - the target URL will open in the full body of the window

Related

HTML 9089031361693059198

Post a Comment

emo-but-icon

Search Here

Popular query

Follow Us

Ads By Google

Get free Update

Enter your email address:

E-mail verification is must for complete subscription

Delivered by FeedBurner

Circle AFS on Google Plus!

Follow AFS Google+ page
 

Side Ads

DMCA protected
Information, images and the content on this blog is Copyright ©AFS2011-2018. Please do not copy Any content for commercial purpose else we have to take a legal action. Thanks !!

Total Pageviews

Recent

free counters
 

Connect Us

Speech by ReadSpeaker

item