Announcement

Collapse
No announcement yet.

Linking a CSS external sheet to a HTML pageI am trying to test my web design skills b

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Linking a CSS external sheet to a HTML pageI am trying to test my web design skills b

    Is there some sort of code to link the two?
    Do I have to do something different in a text editor to make the pages link?
    Do I have to position the CSS file somewhere different in the site folder?

    Cheers

  • #2
    Between the <head> meta tags insert your link like this:

    <link href="http://yourdomain.ext/file.css" media="screen, projection" rel="stylesheet" type="text/css">

    And it should be fine.

    Comment


    • #3
      Originally posted by ouahabix View Post
      Between the <head> meta tags insert your link like this:

      <link href="http://yourdomain.ext/file.css" media="screen, projection" rel="stylesheet" type="text/css">

      And it should be fine.
      That's fine if the actual CSS file is already on the server
      The option would be to create specific folders within the web directory

      Example:
      css FOLDER which contains the CSS file
      images FOLDER which contains images
      and then in your root directory as an example index.html

      Then if you were just testing the page (that is opening up an html file to look at it from your PC), then the code would be:
      <link href="css/yourfilename.css" rel="stylesheet" type="text/css" />

      And then you can test the page without having to upload it anywhere

      Comment


      • #4
        And what about css 3.0 and html 5.0, is this will be good for it too?

        Comment

        Working...
        X