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://www.w3schools.com/"
target="_blank">Visit W3Schools!</a>
Posted in HTML. No Comments »

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

<a href="http://blog.uad.ac.id/onggo">Visit my blog!</a>

The line above will look like this in a browser:

Visit my blog!
Posted in HTML. No Comments »

Some Other Commonly Used Character Entities:

Result Description Entity Name Entity Number
¢ cent &cent; ¢
£ pound &pound; £
¥ yen &yen; ¥
§ section &sect; §
© copyright &copy; ©
® registered trademark &reg; ®
× multiplication &times; ×
÷ division &divide; ÷
Posted in HTML. No Comments »

The Most Common Character Entities:

Result Description Entity Name Entity Number
non-breaking space &nbsp;
< less than &lt; <
> greater than &gt; >
& ampersand &amp; &
quotation mark &quot;
apostrophe &apos; (does not work in IE)
Posted in HTML. No Comments »

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 &nbsp; character entity.


The Most Common Character Entities:

Result Description Entity Name Entity Number
non-breaking space &nbsp;
< less than &lt; <
> greater than &gt; >
& ampersand &amp; &
quotation mark &quot;
apostrophe &apos; (does not work in IE)

Some Other Commonly Used Character Entities:

Result Description Entity Name Entity Number
¢ cent &cent; ¢
£ pound &pound; £
¥ yen &yen; ¥
§ section &sect; §
© copyright &copy; ©
® registered trademark &reg; ®
× multiplication &times; ×
÷ division &divide; ÷
Posted in HTML. No Comments »