Find the answer to your Linux question:
Results 1 to 5 of 5
Since I have nothing to put on my (yet to be setup) website, I thought I'd get it validated bt W3C so i could get a nice little pic to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157

    html 4.01 (tryning to get it validated)


    Since I have nothing to put on my (yet to be setup) website, I thought I'd get it validated bt W3C so i could get a nice little pic to fill up th botom of my pages.

    But when I try validate it I get this error: Line 19, column 6: end tag for "HEAD" which is not finished

    the script is:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
    <style type="text/css">
    body 
    &#123;
    background-image&#58;
    url&#40;'/home/dylunio/Llyniau/bg_2.gif'&#41;
    &#125;
    menu &#123;
    color&#58;"#000000"
    &#125;
    p
     &#123;
     text-align&#58; left
     &#125;
    </style>
    </head>
    
    <body>
          
    
          
    
          
    
          
    
              
    
    
                 Pwy ydy Iestyn?
    
                 Linux
    
                 Cerddoriaeth
    
                 Linciau
    
             </p>
                
    
    
                   [img]/home/dylunio/Llyniau/tux/Tux_Cymrux.png[/img]
              </p>  
    </body>
    </html>
    This is the first time I've done any html, and I would like to know what I've done wrong, since I've maniged to fix of the other 10 or so errors ther were.

    Thanks;

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  2. #2
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    im not a 100% sure... but as for web programming putting css right in code isnt very good...

    <LINK href="Styles.css" type="text/css" rel="stylesheet">
    put this tag instead, and create a css file named Styles.css with the css code you've put in...

    and try again...
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  3. #3
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Tried that, and it didn't work ,

    any other suggestions?

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    Quote Originally Posted by UgoDeschamps
    <LINK href="Styles.css" type="text/css" rel="stylesheet">
    that's almost right (me beeing even xhtml strict targetting), the best would be:
    <link rel="stylesheet" href="css/style.css" type="text/css" />
    but just
    <link rel="stylesheet" href="css/style.css" type="text/css">
    will do for html 4.01

    so, just all the css in the file "styles.css" (which should lie in the dir "css"), and no other stuff.

    btw, I think the error is about a missing <title> --I know XHTML requires is, even if it's blank, it must be present.

    Also, all tags and attributes must be lower case in xhtml.

    so in short, this is how it should look:
    Code:
    file&#58; css/style.css
    -----------------------------------------------------------------
    body &#123; background-image&#58;  url&#40;'/home/dylunio/Llyniau/bg_2.gif'&#41;; &#125;
    menu &#123; color&#58;"#000000"; &#125;
    p &#123; text-align&#58; left;  &#125;
    -----------------------------------------------------------------
    
    the html file&#58;
    -----------------------------------------------------------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
     <head>
      <title></title>
      <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
      <link rel="stylesheet" href="css/style.css" type="text/css">
    </head>
    
    <body>
          
    
          
    
          
    
          
    
              
    
    
                 Pwy ydy Iestyn?
    
                 Linux
    
                 Cerddoriaeth
    
                 Linciau
    
             </p>
                
    
    
                   [img]/home/dylunio/Llyniau/tux/Tux_Cymrux.png[/img]
              </p> 
    </body>
    </html>
    -----------------------------------------------------------------
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  6. #5
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    Thanks both, now I'm useing css style sheets, and not having css in the <head> tags;

    Thanks scientica for the <title> tags that sorted it out ;

    dylunio
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

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