HTML
  Home arrow HTML arrow Page 3 - HTML: Working with Special Characters
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML: Working with Special Characters
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 2
    2008-02-13

    Table of Contents:
  • HTML: Working with Special Characters
  • Linking to Someone Else’s Website
  • Opening a Link In a New Window
  • How to Create a Mailto Link
  • Special Characters/Entities in HTML

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    HTML: Working with Special Characters - Opening a Link In a New Window


    (Page 3 of 5 )

    So far the links we have created have loaded in the same browser window. This is okay if we are linking to pages within our own site. But what about when we link to someone else’s site? Or what if we just want to display a page with a small bit of information? Loading the page in a new window allows the user to view whatever page they want, without leaving our site.

    To create a link that will open in a new window, we use the following code:


    <html>

    <body>


    <a href="somepage.htm" target="_blank">New Window</a>


    <p>

    Setting the target to _blank forces the page to open in a new window.</p>


    </body>

    </html>

    The above code displays the text New Window and stores the link to somepage.htm. When the user clicks the link, it will open a new browser (this occurs because we set the target as _blank), which displays the samepage.htm.

    Link to a Target on the Same Page

    If you are creating a page with an index on it or a page with a bunch of sections, you can use an anchor to link to specific sections of that page.


    <html>

    <body>


    <p>

    <a href="#Apples">Apples</a>

    </p>


    <p>

    <a href="#Bananas">Bananas</a>

    </p>


    <h2>Section 1</h2>

    <p>blah blah blah</p>


    <h2>Section 2</h2>

    <p>blah blah blah</p>


    <h2>Section 3</h2>

    <p>blah blah blah</p>


    <h2><a name="Apples">How to Eat Apples</a></h2>

    <p>blah blah blah</p>


    <h2><a name="Bananas">How to Eat Bananas</a></h2>

    <p>blah blah blah</p>


    <h2>Section 6</h2>

    <p>blah blah blah</p>


    <h2>Section 7</h2>

    <p>blah blah blah</p>


    <h2>Section 8</h2>

    <p>blah blah blah</p>


    </body>

    </html>

    The above code creates two anchor tags (<a href="#Apples"> and <a href="#Bananas">) with name attributes (><a name="Apples"> and ><a name="Bananas">). When the user clicks either the word Apple or Banana, they are transported to the section How to Eat Apples or How to Eat Bananas respectively.

    More HTML Articles
    More By James Payne


       · Hey, thanks for stopping by to read the new installment of my series on HTML. In...
     

    HTML ARTICLES

    - Tabular Database Forms with HTML
    - Using the Find Functions for HTML Database F...
    - Sorting for Database Forms with HTML
    - Edit and Other Database Form Functions with ...
    - More Database Form Functions with HTML
    - Database Form Functions with HTML
    - Using the HTML Table Element as a Recordset
    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...
    - Animation of Geographical Map Regions
    - Changing and Moving Pictures with CSS
    - Clickable Geographical Map Regions
    - Gradient Creation with the HR Element
    - Text on HTML Images: Do it Yourself







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway