HTM: Section 2 Hypertext Links Different section of same page On page link Different web page Different web site Links are underlined by the browser Browser default color New Codes   Space · Bullet (centered dot)
Classes – Grading – Appointment - Safety HTM: Section 2 On Page Link Single Web Page Classes – Grading – Appointment - Safety Classes This is some text for this particular section of the web page. It has nothing to do with the link but is just information Grading This is some text for this particular section of the web page. It has nothing to do with the link but is just information Appointment This is some text for this particular section of the web page. It has nothing to do with the link but is just information Safety This is some text for this particular section of the web page. It has nothing to do with the link but is just information
Classes – Grading – Appointment - Safety HTM: Section 2 On Page Link Single Web Page Classes – Grading – Appointment - Safety Classes This is some text for this particular section of the web page. It has nothing to do with the link but is just information Grading This is some text for this particular section of the web page. It has nothing to do with the link but is just information Appointment This is some text for this particular section of the web page. It has nothing to do with the link but is just information Safety This is some text for this particular section of the web page. It has nothing to do with the link but is just information
On Page Link HTM: Section 2 Origination (From) of link Format <a href=“#somelabel”>text</a> “#somelabel” = name of destination Text = heading of the link </a> = end of tag Destination (To) of link Format <a name=“somelabel”>text</a> “somelabel” = name of destination Text = heading of the link </a> = end of tag Go from one area on a page to another area Note the # in the Origination HTML
I. On Page Links Page 2.04 – 2.10
Links to other same site pages HTM: Section 2 Links to other same site pages Home Page
Links to other same site pages HTM: Section 2 Links to other same site pages Origination (From) of link Format <a href=“somepage.htm”>text</a> “somepage.htm” = name of destination file Text = heading of the link </a> = end of tag Destination (To) of link Page must exist in same folder Go from one page to another page in the same web site FYI: link to a file in the preceding folder ../somefile.htm
II. Same Site Page Links Page 2.10 – 2.21
Links to other site pages - Addressing HTM: Section 2 Links to other site pages - Addressing Absolute Path Name Precise location of the file Preceded by a forward slash / Relative Path Names Same folder: filename.htm Previous folder: ../filename.htm Sub folder: subfolder/filename.htm Origination (From) of link Format Same folder <a href=“somepage.htm”>text</a> Sub folder <a href=“/somepage.htm”>text</a> <a href=“/somefolder/somepage.htm”>text</a> Previous folder <a href=“../somepage.htm”>text</a>
Links to other sites on the Internet HTM: Section 2 Links to other sites on the Internet Origination (From) of link Format <a href=“http://www.somesite.extension”>text</a> Examples <a href=“http://www.somesite.com”>text</a> <a href=“http://www.somesite.com/directory”>text</a> FYI: Default page is index.htm or index.html if no HTML file is specified
Pages in a new window HTM: Section 2 <a href=http://url target=“windowname”>text</a> Opens the linked document in the named window (frames) <a href=http://url target=_blank>text</a> Opens the linked document in a new window Note: no quotation marks around the _blank Works with any name of a non-existing window Example: target=x
Email Link HTM: Section 2 Format <a href=“mailto:emailaddress“>text</a>
LAB/Homework Assignment Update Mr. Dube’s Web Site Pages 2.22 – 2.32 Email address to use: Morris.fulcher@baker.edu Put “Test from WEB111A” in the Subject line if you wish to send a test email