There need to be a target tag and a link tag.

The target tag might look like this

<body>

<a id='top'><a>

with content between the two <a>

The link tag might look like this

<a href="#top">Go to Top</a>

</body>


The  link only works if the user is far enough down the page that they would otherwise have to scroll up to the top of the page.

PAGE LINKS

links are created using the <a href="http://...>text the user will see to click on</a>   The link text goes between the opening <a> and the closing </a>

href attributes

     The full url takes one to another website href="http://lindahagen.com"

      Within a web site you can use a relative url 

             If the page is in the same folder then use the name of the file.

             If the page is in a different folder then within that folder the sub-folders would be listed.  href="/jm1/image/BlueFlower.jpg"  This file is in a image is a sub-folder of lindahagen.   href="/jm1/image/flower/BlueFlower.jpg"  is in a sub-sub-folder of lindahagen (lindahagen->image->flower)

             If the page is in a different folder that is not the sub-folder of the folder being referenced then ../ is used for every folder level one wants to go up. 

EMAIL LINKS


  To use a specific email address to mail to the href references a mailto:  href="mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.">email to John doe</a>  this opens up the email program in compose or new.

 

TARGET NEW WINDOW OR NEW TAB


Adding the attribute of target to the element allows one to decide if it should be in the same window, new window or new tab.

A new window would be <a href="http:/www.lindahagen.com" target="_blank">new window</a>

To open over the site leave off the target <a href="http://www.lindahagen.com" target="_self">same window</a>

To open in a new tab <a href="http:/www.lindahagen.com" target="tab">new tab</a>  not sure if this will work.

 

PARTS OF A PAGE

 The id  attribute used to target any HTML element within a page that can be linked to.  It is used to link within a page.  It has to start with a letter. No two attributes can have the same value.   Such as <h1 id="top">title</h1>.  The <a> element is used to link with the id.  The href in the <a> starts with a #.  Thus, <a href="#top">Go to top of page</a> with take one to where the id="top".

If the link to a specific part of a page is on another page the href would look like following:  

<a href=http://lindahagen.com/#top">  or if on the same website same folder href="/jm1/images/BlueFlower.jpg"/#top"> or may use ../

 

Comments (0)

500 characters remaining

Cancel or