HTML - How to use alternate stylesheets

  1. For the primary stylesheet
    • Use the link relation "stylesheet"
    • Add a title
  2. For each alternative stylesheet
    • Use the link relation "alternate stylesheet"
    • Add a title
  <html>
    <head>
        <link rel="stylesheet" title="Grayscale" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/grayscale.min.css">
        <link rel="alternate stylesheet" title="Obsidian" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/obsidian.min.css">
    </head>
  </html>
The current page uses alternate stylesheets. Open in FireFox or Internet Explorer, and look under the View menu.

[firefox.gif]

Ads by Google


Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath