Say Some Words About This Site


Hello Friends , Knowlegde is Good only if we share it with each other.So i am here to share my knowledge with u people.This site contain all computer related tricks and many more.But try all the tricks at ur own risk , i am not responsible for any damage.

Hope you all Understand the tips and tricks that is mention in this site , if u have any doubt then plz give ur feedback. I try to do my best.

Hope u Enjoy
...

CHAT WINDOW



29 February, 2008

HTML Character Entities And Links (Tutorial 4 ) ...

HTML Character Entities And Links (Tutorial 4 ) ...



HTML Character Entities



Some characters like the < character, have a special meaning in HTML, and therefore cannot be used in the text.

To display a less than sign (<) in HTML, we have to use a character entity.



_____________________________________________________________________________


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: < or < >


_____________________________________________________________________________


Non-breaking Space


The most common character entity in HTML is the non-breaking space.

Normally HTML will truncate spaces in your text. If you write 10 spaces in your text HTML will remove 9 of them. To add spaces to your text, use the character entity.


_____________________________________________________________________________

The Most Common Character Entities:


ResultDescriptionEntity NameEntity 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:


ResultDescriptionEntity NameEntity Number
¢cent&cent;&#162;
£pound&pound;&#163;
¥yen&yen;&#165;
euro&euro;&#8364;
§section&sect;&#167;
©copyright&copy;&#169;
®registered trademark&reg;&#174;
×multiplication&times;&#215;
÷division&divide;&#247;



HTML Links



HTML uses a hyperlink to link to another document on the Web.

_____________________________________________________________________


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 Knowledgerush:



<a href="http://http://knowledgerush.blogspot.com/">Visit Knowledgerush!</a>



The Target Attribute

With the target attribute, you can define where the linked document will be opened.


The line below will open the document in a new browser window:

<a href="http://knowledgerush.blogspot.com/"
target="_blank">Visit knowledgerush !</a>



__________________________________________________________________________________


The Anchor Tag and the Name Attribute



The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page, instead of letting the user scroll around to find what he/she is looking for.

Below is the syntax of a named anchor:



<a name="label">Text to be displayed</a>






The name attribute is used to create a named anchor. The name of the anchor
can be any text you care to use.

The line below defines a named anchor:



<a name="tips">Useful Tips Section</a>





You should notice that a named anchor is not displayed in a special way.

To link directly to the "tips" section, add a # sign and the name of the anchor to the end of
a
URL, like this:



<a href="http://knowledgerush.blogspot.com/html_links.asp#tips">
Jump to the Useful Tips Section</a>






A hyperlink to the Useful Tips Section from WITHIN the file "html_links.asp"
will look like this:



<a href="#tips"> Jump to the Useful Tips Section</a>









Regards:-

Manan Saini.





No comments: