link ref='' - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:link


Selected Values for the rel Attribute of the link Element

alternate Links to an alternative version of the document
authorLinks to the author of the document.
help Links to help related to the current document.
icon Specifies an icon resource.
license Links to a license associated with the current document.
pingback Specifies a pingback server
prefetch Preemptively fetches a resource.
stylesheet Loads an external CSS stylesheet.

Loading a Stylesheet

The styles.css File

a {
    background-color: grey;
    color: white;
    padding: 0.5em;

Using the link Element for an External Stylesheet

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
      <link rel="stylesheet" type="text/css" href="styles.css"> 
          I like 
         <code id="myId">HTML</code>
          and CSS. <!--from w w  w . j  a v a  2s .c  o  m-->
      <a href="">Visit</a> 
      <a href="page2.html">Page 2</a>  

Related Tutorials