Adjusting the look of a hyperlink

In HTML, a hyperlink is specified by the tag <a>. Here is an example:

<a href="https:/www.youtube.com/">YouTube</a>

By default, the text in a hyperlink is blue and underlined. However, you can use CSS to change the appearance of a hyperlink. For example,

<style>
a {
  text-decoration: none;
  color: red;
  border: 1px solid black;
  background: green;
}

a:hover {
  color: black;
  }

a:visited {
  color: green;
}
</style>

This will change the text of the hyperlink be red (color) and to NOT be underlined (text-decoration) with a black border (border) and a green background (background). The text will turn black when you hover over it and it will be blue after you visit the site.

References

HTML Reference (w3schools.com)

HTML a tag (w3schools.com)

Comments

Leave a comment