Saturday, January 16, 2016

HTML & CSS - Links

Links are very important in the online world. They are very powerful Internet tools that help you interact with your audience. “Links are the defining feature of the web because they allow you to move from one web page to another — enabling the very idea of browsing or surfing.” (Duckett 75). There is a variety of links we can include in HTML pages. An example can be a link that takes you from one website to another website or a link that takes you from one page to another page on the same website. Sometimes links can open a new browser window or take you to your email program. Within chapter four of HTML & CSS, I learned how to create links within my HTML page.

When writing a link, you use the <a> element. Between the opening and closing tags, you can specify the page you want to link to using the href attribute. “The text between the opening <a> tag and closing </a> tag is known as link text. Where possible, your link text should explain where visitors will be taken if they click on it (rather than just saying “click here”).” (Duckett 78). When looking at this in a text editing application like TextWrangler, you can see the website that you would be directed to if you were to click on the link. When looking at it in a browser, you would simply see the link.

When linking to a different website from the one you are on, you follow the same procedure using the <a> element and the href attribute. It’s what you set as the value for the href attribute that matters. To link to a different website you use an absolute URL (Uniform Resource Locator) which is basically the full web address for the site. “An absolute URL starts with the domain name for that site, and can be followed by the path to a specific page.” (Duckett 79). These URL’s are very specific with where you are being directed to. When linking to other pages on the same site, you use a relative URL unlike times when you are linking to a different website. A relative URL is not as specific as an absolute because you do not need to specify the domain name. If you want your link to open up in a separate window, you can use the target attribute within the <a> tag with the value being _blank.

Links allow us to connect with our audience a little more through our webpage. They allow people to navigate easily through your webpage by creating shortcuts. With my example (below), I have linked the songs that I listed to videos that will open in different tabs. I had decided to do this because not only does it allow my audience easier access to the songs (rather than searching them), but it allows my audience listen to the song in a different tab where they won't have to go through the hassle of pressing backspace when they want to visit my webpage again. As you can see, links provide a way to connect with our audience.

Are there any songs that you guys would like me to add to my list?

Below, I have linked each song to a YouTube video that will open up in a new window.
View in TextWrangler
View in Safari

No comments:

Post a Comment