instructions of how to link an external style sheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • av10
    New Member
    • Feb 2010
    • 7

    instructions of how to link an external style sheet

    I’m looking for instructions of how to link an external style sheet file to my html page. Also instructions on where to place the link within the html document.
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    You must place your links to external css itno the head part of your html page and here is the code:
    Code:
    <head>
    <link rel="stylesheet" type="text/css" href="path/to/your/css/file/index.css"/>
    </head>
    Note:
    Very good idea is to check source code of the pages you find interesting. You'll find loads of interesting html,css and JavaScript. You can do it by view->source through your browser but for loads more useful information you should really install firebug.

    Comment

    • Ashwani Sharma
      New Member
      • Nov 2008
      • 46

      #3
      Zorgi gave a good idea to including a external CSS file into document.
      There is one more idea to including a external CSS file into any documents and that is:

      <style type="text/css" media="all">@im port "path/to/your/css/file/index.css";</style>

      You have to use this into header section of your document. This will also work fine for you.

      Comment

      • tharden3
        Contributor
        • Jul 2008
        • 916

        #4
        so "style" can be used in any type of page? Not just HTML?

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #5
          Originally posted by tharden3
          so "style" can be used in any type of page? Not just HTML?
          not in any. you can use it in any Markup Language*, as long as it is not violating the syntax and/or validation rules. whether it makes sense or has any effect on the document is questionable, though.

          * – of the XML and HTML family, maybe even SGML.

          Comment

          Working...