How to make a hyperlink in HTML code

14
make a hyperlink in HTML code

Transcript of How to make a hyperlink in HTML code

make a hyperlink in HTML code

Hyperlinks are a great way to direct traffic within your

website...helping users find what’s of interest to them and staying on your site for longer.

HTML can take a long time to learn

But creating links is so valuable and

takes just seconds to learn

This starts with making tag brackets.

Tag brackets are a very important part of the code.

They tell the web page where the code <>starts and ends</>

Tags are normally made of one to three letters. They define what sort of action will be performed.

For a hyperlink, the tags are where 'a' stands for 'anchor', which tells the code that it needs to anchor one page to another.

Both brackets contain the same letter but the / in the second tag shows that the piece of code has finished.

<a></a>

Which, let's face it, probably isn't what you wanted (So always close your tags properly).

The href attribute is the part of the code that will tell a web page where to send the visitor.

It stands for 'Hypertext Reference' and directs the navigation.

The equals sign and speech marks define the location the vlink wil lead to, making the script and destination understandable for the browser.

<a href=“”></a>

Insert your destination address

between the two speech marks.

<a href=“http://www.marketingsupportalliance.com”></a>

Decide how you want the

hyperlink to be displayed.

Common examples include text,

buttons or images.

The visual element of the hyperlink sits between the > and </a>.

If you’re choosing to display text, write it here. If it’s an image file, it’s URL or file path should be

displayed.

<a href=“http://marketingsupportalliance.com”

>Marketing Support Alliance</a>

Have a look at the link in a preview or visual

editor to make sure it's okay.

Test the hyperlink to ensure it navigates

correctly.

Add target=“_blank” to your code before the first closing bracket

<a href=“http://marketingsupportalliance.com” target=“_blank”>Marketing Support Alliance</a>

'target' is the attribute that will tell the code where to open the new link '_blank' tells the code that the link should be opened in a new window