How+to+Code+Hyperlinks+in+HTML



Let's try our hand at hyperlinks. A hyperlink, otherwise known as 'link,' is a word, group of words, or image that you can click on to go to another webpage or view or download another document.

The HTML  tag defines a hyperlink. The most important attribute of the  element is the href attribute, which indicates the link’s destination.

By default, links will appear as follows in all browsers:
 * An unvisited link is underlined and blue
 * A visited link is underlined and purple
 * An active link is underlined and red

Let's open our alignandimage.txt file. Find the line that says, "I'll start by going to MrMendonez.wikispaces.com."

Right now the code for it should look like this:

My HTML skills are  growing  each  day. There is just so much more I need to learn!Where should I begin? I got it! I'll start by checking out MrMendonez.wikispaces.com ;)  Let's first change the sentence around so it says, "I'll start by checking out Mr. Mendonez's Web Design Site"  Now around the words, "Mr. Mendonez's Wiki Site," let's add the following code:  Mr. Mendonez's Wiki Site

The text in between the link tags will be the text that can be seen by the viewer. It will appear as blue font and underlined text unless the site has already been visited it will then appear as purple font and underlined text. Test the code out by saving the text file as an html file. Let's also try coding a hyperlink that opens in a new window or a new tab. Let's also create a paragraph tag that will say, "I can also open Mr. Mendonez's Wiki Site," in a new tab. You will need to add the following attribute into your hyperlink tag: target="blank" The code for that should look like: I can also open Mr. Mendonez's Wiki Site in a new tab.

You can also make pictures as hyperlinks too. Instead of writing text in between the link tags put in the code for an image as the element. It would look something like this:



Try giving the two pictures in your alignandimage.txt file hyperlinks also.

Hope this was helpful!

-Mr. Mendonez