External CSS

  • When you need to make changes to several pages, you often use the external style sheet.

  • It is perfect in this situation because it enables you to alter just one file to alter the appearance of the complete website.

  • It uses the <link> tag on every page and the <link> tag should be put inside the head section.

  • Example:

    <head>

    <link rel="stylesheet" type="text/css" href="mystyle.css">

    </head>

Advantages of External CSS:

  • The style of several documents can be controlled from the site by using them.

  • Multiple HTML elements can have many documents, where classes can be created.

  • To group styles in complex situations, selector and grouping methods are used.

Disadvantages of External CSS:

  • An extra download is needed to import documents having style information.

  • To render the document, the external style sheet should be loaded.

  • Not practical for small style definitions.