Hyperlinks

  • implemented using anchor tag
  • States (pseudo-classes):
    • unvisited : a:link
    • visited : a:visited
    • hover (mouse is hovering) : a:hover
    • active (after clicking and before loading the page) : a:active

href

  • Absolute URL (https://....)
  • Relative URL (contacts.html)
  • Referencing ID (#ID)
  • Protocols (mailto:abc@alphabets.com)

target

  • Opens in same window (_self)
  • Open in new tab or window (_blank)

download

  • giving filename is optional
  • represents if link is downloadable content
  • download="filename_without_extension"

media

  • specifies kind of media or device the URL you linked to href is optimized for
  • syntax: <media-query> <media-rendering-values>
  • example: "print and (resolution: 250 dpi)"

hreflang

  • language of referenced URL