Can’t Validate my assignment on W3C

  • Author
    Posts
  • #481973

    sl1k
    Member

    @thesacredpath, You’re welcome!

    #481974

    skyblue12
    Member
    <html>
       <head>
            <title>Via Roma Juices</title>
            <link rel="stylesheet" type="text/css" href="vrstyle.css" />
       </head>
       <body>
    	<h1>Italian Organic Restaurant</h1>
    	<hr />
    	<p><a href="index.html">| HOME |</a> <a href="menu.html">MENU</a> <a href="juices.html"> |JUICES |</a> <a href="contact.html">CONTACT |</a> <a href="Functions.html">FUNCTIONS |</a> <a href="staff.html">STAFF |</a> </p>
    	<hr />
            <h3>RESTAURANT MENU</h3>
    	<p>Starters
      	Pasta
      	Pizza Veggie
    	</p>
    	<h3>STARTERS</h3>
    	<p>Garlic Bread crusty bread with garlic and olive oil &pound;3.50 </p>
    	<p>Garlic and Tomato Bread delicious foccacia bread with roasted garlic and tomato &pound;4.30</p>
    	<p>Minestrone soup with green beans, carrots and courgettes, served with
              crusty bread &pound;5.00</p>
    	<p>Rocket Salad Rocket leaves with olive oil and parmesan cheese &pound;3.50</p>
    	<h3>PASTA</h3>
    	<p> Penne alla Mariniero penne pasta with organic smoked salmon, tuna, parmesan and creamy
              white sauce &pound;7.50 </p>
    	<p>Ravioli con Fungi ravioli stuffed with porcini and a tomato and basil sauce &pound;7.50</p>
    	<p>Penne a la Carbonara penne pasta with parma ham, garlic, parmesan, egg, and cream &pound;7.50</p>
    	<p>Blue Cheese Macaroni macaroni pasta with blue cheese &pound;7.50</p>
    	<p>Pesto Spaghetti spaghetti pasta with pesto sauce, basil, pine nuts and parmesan cheese &pound;7.80</p>
    	<p>Tuna Cannelloni cannelloni pasta filled with tuna, mushrooms, and ricotta cheese &pound;8.50</p>
    	<p>Seafood Fettuccine fettuccine pasta with prawns, squid, mussels and coriander sauce &pound;10.00</p>
    	<h3>PIZZA VEGGIE</h3>
    	<p>Margherita mozzarella and tomatoes &pound;7.80</p>
    	<p>Rustica mozzarella, tomatoes, mushrooms, sun dried tomatoes, and olives &pound;8.90</p>
    	<p>Quattro Formaggi mozzarella, dolcelatte, goats' cheese and parmesan &pound;8.90</p>
    	<p>Fiorentina mozzarella, tomatoes, spinach, egg, roasted and tomatoes &pound;9.50</p>
       </body>
    </html>
    #481975

    @skyblue, the code above (the last code you posted) validates just fine.

    From W3C validator: This document was successfully checked as XHTML 1.0 Strict!

    Copy that code out of this thread and use it instead of what you have.

    #481976

    skyblue12
    Member

    Manu codes are above – I tried doing it again and its still coming up with Warning No Character Encoding Found! Falling back to UTF-8. Error Line 1, Column 0: end of document in prolog . What shall i do?

    #481977

    OK, you got the backtick down, but that is different code.

    You need to include the standard stuff in the head section on each and every HTML/XHTML page you create. Put in the stuff in the head section and then check again.

    #481978

    skyblue12
    Member

    Hey, which one shall i copy? i copied the one with the ` but i can’t get it to work still? Going crazing :-)

    #481979

    phoxis
    Member

    I think it is good to first correct the code offline with html tidy and then finally get the code posted.
    Try Htmltidy http://www.w3.org/People/Raggett/tidy/
    does this help ?

    #481980

    This needs to be at the top of the document:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>Via Roma Italian Restaurant</title>
    <link rel="stylesheet" type="text/css" href="vrstyle.css" />
    </head>
    #481981

    The above needs to be at the top of every HTML document. You always need to set doctype and such.

    #481982

    skyblue12
    Member

    thesacredpath I’ve tried it and still nothing :-( How come you got it to work i can’t do it myself? will try again.

    #481983

    skyblue12
    Member

    Thanks phoxis :-) This is hard work!!

    #481984

    Take a look at this web page which explains about the standard structure of an HTML page.

    http://www.w3.org/TR/html401/struct/global.html

    You always need to declare the HTML/XHTML version (doctype) and you always need a declarative head section. You had that on the first bit of code you posted, but it was missing from the last bit.

    And I’m shutting down and heading to bed.

    #481985

    OK, this is valid code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>Via Roma Italian Restaurant</title>
    <link rel="stylesheet" type="text/css" href="vrstyle.css" />
    </head>
    <body>
    	<h1>Italian Organic Restaurant</h1>
    	<hr />
    	<p><a href="index.html">| HOME |</a> <a href="menu.html">MENU</a> <a href="juices.html"> |JUICES |</a> <a href="contact.html">CONTACT |</a> <a href="Functions.html">FUNCTIONS |</a> <a href="staff.html">STAFF |</a> </p>
    	<hr />
            <h3>RESTAURANT MENU</h3>
    	<p>Starters
      	Pasta
      	Pizza Veggie
    	</p>
    	<h3>STARTERS</h3>
    	<p>Garlic Bread crusty bread with garlic and olive oil &pound;3.50 </p>
    	<p>Garlic and Tomato Bread delicious foccacia bread with roasted garlic and tomato &pound;4.30</p>
    	<p>Minestrone soup with green beans, carrots and courgettes, served with
              crusty bread &pound;5.00</p>
    	<p>Rocket Salad Rocket leaves with olive oil and parmesan cheese &pound;3.50</p>
    	<h3>PASTA</h3>
    	<p> Penne alla Mariniero penne pasta with organic smoked salmon, tuna, parmesan and creamy
              white sauce &pound;7.50 </p>
    	<p>Ravioli con Fungi ravioli stuffed with porcini and a tomato and basil sauce &pound;7.50</p>
    	<p>Penne a la Carbonara penne pasta with parma ham, garlic, parmesan, egg, and cream &pound;7.50</p>
    	<p>Blue Cheese Macaroni macaroni pasta with blue cheese &pound;7.50</p>
    	<p>Pesto Spaghetti spaghetti pasta with pesto sauce, basil, pine nuts and parmesan cheese &pound;7.80</p>
    	<p>Tuna Cannelloni cannelloni pasta filled with tuna, mushrooms, and ricotta cheese &pound;8.50</p>
    	<p>Seafood Fettuccine fettuccine pasta with prawns, squid, mussels and coriander sauce &pound;10.00</p>
    	<h3>PIZZA VEGGIE</h3>
    	<p>Margherita mozzarella and tomatoes &pound;7.80</p>
    	<p>Rustica mozzarella, tomatoes, mushrooms, sun dried tomatoes, and olives &pound;8.90</p>
    	<p>Quattro Formaggi mozzarella, dolcelatte, goats' cheese and parmesan &pound;8.90</p>
    	<p>Fiorentina mozzarella, tomatoes, spinach, egg, roasted and tomatoes &pound;9.50</p>
       </body>
    </html>
    #481988

    skyblue12
    Member

    Thank you for helping me good night. Hope i can work this out.

The topic ‘Can’t Validate my assignment on W3C’ is closed to new replies.