HTML Terminology & Links
Links are used on almost every website and are also fairly easy to understand, so they are a good place to begin learning HTML. Before I dive into explaining HTML links, here is some basic HTML terminology that I will be using: TAG ATTRIBUTE CLOSING TAG HTML Link Basics
This line of HTML code begins with a less than symbol: < The tag name for an HTML link is: A You can see a lower-case a after the less than symbol - this is the tag name for the link. It is OK to use either lower-case or upper-case for your tag names and tag attributes. After the tag name is a space and then a tag attribute, href. This attribute name is followed by an equal sign: = Next, you can see double quotes surrounding the website address: http://ryanstevensonplugins.com/ That website address URL is where the visitor will be taken when they click the link. Next is another space followed by another tag attribute: target. Just like the href attribute, this attribute is followed by an equal sign with the value surrounded by double quotes. The target attribute tells how to open the link URL in the visitor's browser. If you do not specify the target attribute for an HTML link tag, _self is the default value used. I have used _blank as my value for this example, but here are all of the accepted values of the target attribute:
After the closing double quote for the target attribute value, there is a greater than symbol to end the opening link tag: > Next, you will see some text: Ryan Stevenson Plugins That text is the anchor text used for the link, which is the text that is turned into a clickable link when viewed on a website. I just used simple text for this example, but you can actually use complicated text and even additional HTML coding inside of the link if needed. As a practical example, you could also have an image HTML tag here. Finally, to end the link, you need a closing tag. This closing tag specifies the ending of the link anchor text. It is nothing more than the tag name with a forward slash in front of it and then all of that surrounded by less than a greater than symbols: </a> © HTML Training Guide >>> Back to TABLE OF CONTENTS <<< | |||||||||||||
Views: 512 | |
Total comments: 0 | |