Wasswa  Meagan

Wasswa Meagan

1623854820

HTML Link Code — How to Insert a Link to a Website with HREF

We get to a point when building websites and we want a page to lead or go to another page. Its no news that most websites have the “about us”, “contact us” options on their webpage.

So how do we go about this? how do we link a page to another page? how do we navigate through pages on our websites?

The in html helps in doing this using the HREF attribute.

We might be confused at some point , what then is adding link to your head tag? It also uses HREF attribute after all?

They are two different things and they are added differently.

The external links we add to our head tags works solely on the body.

For example, adding the bootstrap CDN and the google font link

<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"/>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons"rel="stylesheet"/>

</head>

You can’t access these links on your website. They cannot be seen on your website, you only see the effects on the content in the body.

How then will I add a link to my website?

Like I said earlier, the use of and tags is used to add a link to a website. The tag indicates where the hyperlink starts and the tag indicates where it ends. Whatever text gets added inside these tags, will work as a hyperlink.

<head>
   ...
</head>

<body>

   <a>Click me</a>

</body>

You will notice from the code snippet that the tag is inside the body tags. It goes in the body tags where it can be seen and clicked.

But Click me is not yet a “link” if the href attribute is not added.

The **href **attribute is the most important attribute of the hyperlink. It indicates the link’s destination.

#front-end-development #href #html

What is GEEK

Buddha Community

HTML Link Code — How to Insert a Link to a Website with HREF
anita maity

anita maity

1619013192

Create a Personal Portfolio Website Using HTML CSS and JavaScript

Demo Click Here: https://cutt.ly/2vFKuxe

#portfolio website html css #personal website html css #personal portfolio website #how to create a complete peronal portfolio website #responsive portfolio website html css #responsive personal portfolio website html css

anita maity

anita maity

1618639156

Responsive Personal Portfolio Website HTML CSS and JavaScript

Demo: https://cutt.ly/TvxhH2T

#portfolio website html css #personal portfolio website tutorial #portfolio website #responsive personal portfolio website #portfolio website html css javascript #responsive portfolio website html css javascript

wp codevo

wp codevo

1608041337

RESPONSIVE Personal PORTFOLIO Website HTML CSS And JAVASCRIPT

https://youtu.be/J8g9gyzhEoM

#responsive website using html5 and css3 #portfolio website #one page personal website html css #portfolio website design in html css #css responsive website design #responsive website html css

wp codevo

wp codevo

1608043308

Responsive Personal Portfolio Website using HTML CSS & JavaScript

https://youtu.be/CHQvM4oS7ww

#responsive website using html5 and css3 #responsive website html css #portfolio website #portfolio website design in html css #complete responsive website in html css javascript #one page personal website

Nandini roy

Nandini roy

1618667097

Responsive Personal Portfolio Website Using HTML CSS and JavaScript

Tutorial: https://youtu.be/9DDiorNZiyw

#create a portfolio website with html css javascript #personal portfolio complete website using only html css javascript #responsive portfolio website html css javascript #responsive personal portfolio website #portfolio website #responsive website