www.webdeveloper.com
Results 1 to 2 of 2

Thread: Link to external style sheet?

  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Link to external style sheet?

    OK, maybe I'm just stupid but can someone help me with linking a page to an external style sheet?
    I have no problems using internal or inline styles, but I can'ts get a page to format by linking it to an external style sheet.

    This is how I'm trying to do it:-
    Code:
    <html>
    
    <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="p4mestylesheet.css">
    <title></title>
    </head>
    
    <body.bn>
    </body.bn>
    
    </html>
    The name of the style sheet is p4mestylesheet.css

    Any ideas?

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    THere's nothing wrong with your LINK element. The rest of your HTML is a problem however.
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="Content-Style-Type" content="text/css">
    <title>Example</title>
    <link rel="stylesheet" type="text/css" href="p4mestylesheet.css">
    </head>
    <body>
    
    </body>
    </html>
    Get the HTML right; use The Validator. Make certain that the page and the style sheet are in the same directory. And make sure that you have no STYLE tags in the style sheet.

    If all the above fail then post your URL.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles