This Multi-Part series will teach you the Beginnings of HTML. HTML Has many applications, from creating webpages, to .hta files to even formatting blog posts how you want.
These lessons are simple, easy to follow, and critically will remain relevant going forward. You can find the previous parts of the series:
These lessons are simple, easy to follow, and critically will remain relevant going forward. You can find the previous parts of the series:
2.1 Links to Other Pages and Files
One of HTMLs greatest powers is the ability to link pages togeateher through a piece of text called a hot link or link. When the link is clicked it will bring you to a different document, a different section in the same one, or to a completly diferent web site. All links use the same basic code, the HREF tag which looks like <A HREF=“”></A>. The filename of the link goes in between the quotes ant the link text goes between the first and second tags. A link to a different web site would look like:
<A HREF="http://www.somewhere.net/here">This is A link</A>
A link to another file on your sit would look like:
<A HREF="myfile.html">This is also a link</A>
2.2 Mail and News Links
You can also use a link to to go to a newsgroup or send email. To use an email link in the quotes you would use a mailto statement followed by the email address. A newsgroup link would use NEWS instead of mailto. An email link is showen below:
<A HREF="mailto:myemail@me.com">email me here</A>
A newsgroup link looks like the sample below:
<A HREF="NEWS:comp.lang.javascript">comp.lang.javascript Newsgroup</A>
Mailto links are pretty common. Almost nobody uses Newsgroups anymore, having been replaced by social media and web forums.
2.3 In Document Links
Links can also be used to jump to a previous or later part of the document. This is done by first createing a named anchor and then linking to it. A named anchor tells the browser where to go when the link calls it. A named anchor looks like
<A NAME="anchorname">Text</A>
A named anchor’s text is ussualy a section heading but can also be a key word. Their is no change to the text in a named anchor. Text is not even required for a named anchor but it is good style to use it. A link to a named anchor is the same as to a file except that you would use the pound and then the anchorname instead of the file name as showen below
<A HREF="#anchorname">go to text</A>
if you wish to link to that exact spot from a different document then all you have to do is add the documents filename where the anchor is contained so the tag looks like
<A HREF="filename.html #anchorname">go to text in filename</A>
2.3 In Document Links
Links can also be used to jump to a previous or later part of the document. This is done by first createing a named anchor and then linking to it. A named anchor tells the browser where to go when the link calls it. A named anchor looks like
<A NAME="anchorname">Text</A>
A named anchor’s text is ussualy a section heading but can also be a key word. Their is no change to the text in a named anchor. Text is not even required for a named anchor but it is good style to use it. A link to a named anchor is the same as to a file except that you would use the pound and then the anchorname instead of the file name as showen below
<A HREF="#anchorname">go to text</A>
if you wish to link to that exact spot from a different document then all you have to do is add the documents filename where the anchor is contained so the tag looks like
<A HREF="filename.html #anchorname">go to text in filename</A>
No comments:
Post a Comment