Free Web Development Online Tutorials, Learn to Code
A Tag in Html Example, Webpage Designing using HTML, HTML5 Tags, HTML Tutorial for Beginners

Anchor or A Tag Example

Hyperlink A Tag Style

Anchor or a href tag for Hyperlink in HTML
The anchor element is used to create hyperlinks between a source and a destination.

The source can be image, button or plain text that links to another resource, and the destination is also a type of resource (like page, document, images, different website, or some position on same page) that the source anchor links to.

Hyperlinks are one of the fundamental technologies that you will be using very often in web designing and development, by linking web information to information (content), so you need to understand how to use anchor elements, and how you can apply different style on hyperlink .

Anchor or ahref tag <a href="pageurl.html" /> is used when we want to link some content on same page or to a different page

Let's look at some example of Anchor or ahref tag .
<a href="pagename.html" > Click Here </a>

A Tag Attributes

  • href

    here you need to set the destination url, incase want to link something on same page, use #id example: <a href="#dvShortinfo">Link on same page</a>

  • target

    indicate how you want the destination to be open, "_blank" | "_top" | "_self" | "_parent"

  • title

    this is optional, but very useful for SEO

This is how you can create a proper hyperlink tag

<a href="destination_resource_location" target="_blank" title="SEO freindly title text"> Click Here </a>

The default Anchor or A Tag color become blue, and there will always a under line for text and border for image, that’s the default behaviour or looks for any hyperlink tag, but you can change the style and Color of any A Tag, You also can change the Hyperlink display style using CSS Class

Comment
Name
Email
Website
Subscribe