Standard HTML 4.01 HELP

Discussion in 'OT Technology' started by The DIZ, Jan 20, 2004.

  1. The DIZ

    The DIZ Guest

    below is the code that i'm trying to fix, i'm using http://validator.w3.org/ to check to see if it's valid. there are 8 problems that i seriously don't know what's wrong with i've been going over it for the last couple hours and can't seem to understand what's wrong, if someone can help me through AIM or just leave a post it'll greatly be appreciated, thanks. i'm checking just the coding, content isn't necessary


    Line 21, column 18: document type does not allow element "H1" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <H1 ALIGN="CENTER">WELCOME TO THE WORLD OF</H1>
    ^
    Line 22, column 18: document type does not allow element "H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <H2 ALIGN="CENTER">COMPUTERS</H2>
    ^
    Line 25, column 3: document type does not allow element "UL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <UL>
    ^
    Line 33, column 3: document type does not allow element "OL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <OL>
    ^
    Line 70, column 17: document type does not allow element "TABLE" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <TABLE BORDER="2">
    ^
    Line 96, column 3: document type does not allow element "H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <H2><A NAME="glossary">Glossary of Terms</A></H2>
    ^
    Line 97, column 3: document type does not allow element "DL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <DL>
    ^
    Source Listing
    Below is the source input I used for this validation:

    1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    2:
    3: <HTML>
    4: <!--ffw
    5: 123456789
    6: [email protected]
    7: I certify that the following represents my own independent work and
    8: conforms with the guidelines of academic honesty described in the
    9: course syllabus.-->
    10:
    11: <HEAD>
    12: <META http-equiv="Content-Type" content="text/html;
    13: charset=iso-8859-1">
    14: <title> index.html </title>
    15: </HEAD>
    16:
    17:
    18:
    19: <BODY BGCOLOR="A9A9A9">
    20: <FONT FACE="COMIC SANS MS">
    21: <H1 ALIGN="CENTER">WELCOME TO THE WORLD OF</H1>
    22: <H2 ALIGN="CENTER">COMPUTERS</H2>
    23:
    24: <BR>
    25: <UL>
    26: <LI><A HREF="#glossary">Glossary of Terms</A></LI>
    27: <LI><A HREF="#chart">Notebook Base Model Comparison Chart</A></LI>
    28: </UL>
    29: <BR>
    30:
    31:
    32: <B>What Makes A Computer</B>
    33: <OL>
    34: <LI>Different Display Options
    35: <UL TYPE="CIRCLE">
    36: <LI>XGA
    37: <LI>SXGA+
    38: <LI>UXGA
    39: </UL>
    40: <LI>Types Of RAM
    41: <UL TYPE="CIRCLE">
    42: <LI>SDRAM
    43: <LI>DDR
    44: <LI>RDRAM
    45: </UL>
    46: <LI>Size Of Hard Drive
    47: <UL TYPE="CIRCLE">
    48: <LI>Larger hard drives mostly for multimedia/games
    49: <LI>Smaller hard drives for corporate/office work
    50: (mostly documents)
    51: </UL>
    52: <LI>Speed of processor - higher the number faster it runs
    53: <LI>Graphics Card
    54: <UL TYPE="CIRCLE">
    55: <LI>Some offer dual monitor displays
    56: <LI>Higher end graphics cards allow smoother
    57: motion in videos
    58: </UL>
    59: <LI>Combo drives aren't necessarily better
    60: <UL TYPE="CIRCLE">
    61: <LI>They are better in the fact that you save
    62: space having 2 in one
    63: <LI>If speed is a factor you might want to go with
    64: 2 seperate drives
    65: </UL>
    66: </OL>
    67:
    68:
    69:
    70: <TABLE BORDER="2">
    71: <CAPTION><B><I><A NAME="chart">Notebook Base Model Comparison
    72: Chart</A></I></B></CAPTION>
    73: <TR><TH> <TH><A
    74: HREF="http://img.dell.com/images/global/products/inspn/300m_front_131x145.jpg">Dell
    75: 300m</A> <TH><A
    76: HREF="http://www.alienware.com/Images/Prod_Info_Img/cases/configurator_cases/a51m_new_green.jpg">AlienWare
    77: Area-51m: Sentia Extreme</A> <TH><A
    78: HREF="http://www.sonystyle.com/intershoproot/eCS/Store/en/imagesProducts/180x180/PCGZ1A.jpg">Sony
    79: VAIO Z1VAP2</A>
    80: <TR><TD>Display <TD>12.1" XGA TFT <TD>14.1" SXGA+ LCD
    81: <TD>14.1" SXGA+ TFT
    82: <TR><TD>Memory <TD>384MB DDR SDRAM <TD>1024MB DDR PC-2100
    83: <TD>1024MB DDR SDRAM
    84: <TR><TD>Hard Drive <TD>30GB <TD>60GB <TD>80GB
    85: <TR><TD>Processor <TD>1.2 GHz Intel Pentium M Processor
    86: <TD>1.7 GHz Intel Pentium M Processor <TD>1.7 GHz Intel Pentium M
    87: Processor
    88: <TR><TD>Graphics <TD>Integrated Intel Extreme Graphics
    89: <TD>Intel Extreme Graphics 2 <TD>ATI Mobility Radeon 16MB Video
    90: <TR><TD>Optical Drive <TD>24x CD Burner/DVD Combo Drive
    91: <TD>2x1x8x DVD-RW/16x10x24x CD-RW Combo Drive <TD>24x CD Burner
    92: Drive/DVD Combo Drive
    93: <TR><TD>Price <TD>$1,729.00 <TD>$2,670.00 <TD>$2,999.99
    94: </TABLE>
    95:
    96: <H2><A NAME="glossary">Glossary of Terms</A></H2>
    97: <DL>
    98: <DT>SDRAM (Synchronous DRAM)</DT>
    99: <DD>Slowest of the three standard types of RAM usually runs from
    100: 66MHz-133MHz</DD>
    101:
    102: <DT>DDR (Double Data Rate SDRAM)</DT>
    103: <DD>DDR basically doubles the rate of data transfer of standard
    104: SDRAM by transferring data on the up and down tick of a clock cycle. DDR
    105: memory operating at 333MHz actually operates at 166MHz * 2, as if there's
    106: 2 channels being used compared to the single channel of regular SDRAM</DD>
    107:
    108: <DT>Rambus DRAM (RDRAM)</DT>
    109: <DD>RDRAM is the standard used in today's Pentium 4 machines runs
    110: from speeds from 600MHz-1066MHz</DD>
    111:
    112: <DT>XGA</DT>
    113: <DD>This active matrix dislplay resolution is great for home
    114: applications like web browsing, email and word processing.</DD>
    115:
    116: <DT>SXGA+</DT>
    117: <DD>With 87% more information displayed than XGA, this is an ideal
    118: resolution for DVD playback, advanced digital imaging and various
    119: multimedia applications.</DD>
    120:
    121: <DT>UXGA</DT>
    122: <DD>Can display resolutions of up to 1920x1200 offers 25% increase
    123: in in viewing angle and 20% more brightness than a standard notebook
    124: display.</DD>
    125: </DL>
    126:
    127: </FONT>
    128: </BODY>
    129: </HTML>

    The W3C Validator
     
    Last edited by a moderator: Jan 21, 2004
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    You've declared <body> twice, once on line 18 once on line 19. Just delete the one on line 18.

    I'm not sure about the others, but try fixing that first problem and the others might be fixed on their own.
     
  3. The DIZ

    The DIZ Guest

    whoa .... didn't see that one thanks for pointing it out only 7 more to go
     
  4. DFWSR4EVER

    DFWSR4EVER There's Stlil Time to Change the Road You're On

    Joined:
    Jul 29, 2001
    Messages:
    51,573
    Likes Received:
    0
    Location:
    Wisco
    welcome to computers and programming forum
     
  5. NolanTA

    NolanTA You talkin' to me? OT Supporter

    Joined:
    Oct 9, 2002
    Messages:
    2,397
    Likes Received:
    0
    Location:
    Dallas
    The H1 and H2 tags are not supposed to be contained inside the Font tags.. try moving the font tag inside the H* tags and see what the results are..

    Looking at it closer, that is probably all/most of your problem. Remove the font tag altogether, run it through the validator.. see what happens. Then you'll either have to put your font tags back in as needed or use a style sheet.
     
  6. The DIZ

    The DIZ Guest

    thanks alot NolatTA that fixed 2 of the problems now only 5 more to go ... i'm new at this so i really have no clue what can be done to the other errors to fix the code anymore help you can advise me with?
     
  7. The DIZ

    The DIZ Guest

    updated code list......




    Below are the results of attempting to parse this document with an SGML parser.

    Line 26, column 3: document type does not allow element "UL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <UL>
    ^
    Line 34, column 3: document type does not allow element "OL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <OL>
    ^
    Line 71, column 17: document type does not allow element "TABLE" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <TABLE BORDER="2">
    ^
    Line 97, column 3: document type does not allow element "H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <H2><A NAME="glossary">Glossary of Terms</A></H2>
    ^
    Line 98, column 3: document type does not allow element "DL" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
    <DL>
    ^
    Source Listing
    Below is the source input I used for this validation:

    1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    2:
    3: <HTML>
    4: <!--ffw
    5: 123456789
    6: [email protected]
    7: I certify that the following represents my own independent work and
    8: conforms with the guidelines of academic honesty described in the
    9: course syllabus.-->
    10:
    11: <HEAD>
    12: <META http-equiv="Content-Type" content="text/html;
    13: charset=iso-8859-1">
    14: <title> index.html </title>
    15: </HEAD>
    16:
    17:
    18:
    19: <BODY BGCOLOR="A9A9A9">
    20:
    21: <H1 ALIGN="CENTER">WELCOME TO THE WORLD OF</H1>
    22: <H2 ALIGN="CENTER">COMPUTERS</H2>
    23: <FONT FACE="COMIC SANS MS">
    24:
    25: <BR>
    26: <UL>
    27: <LI><A HREF="#glossary">Glossary of Terms</A></LI>
    28: <LI><A HREF="#chart">Notebook Base Model Comparison Chart</A></LI>
    29: </UL>
    30: <BR>
    31:
    32:
    33: <B>What Makes A Computer</B>
    34: <OL>
    35: <LI>Different Display Options
    36: <UL TYPE="CIRCLE">
    37: <LI>XGA
    38: <LI>SXGA+
    39: <LI>UXGA
    40: </UL>
    41: <LI>Types Of RAM
    42: <UL TYPE="CIRCLE">
    43: <LI>SDRAM
    44: <LI>DDR
    45: <LI>RDRAM
    46: </UL>
    47: <LI>Size Of Hard Drive
    48: <UL TYPE="CIRCLE">
    49: <LI>Larger hard drives mostly for multimedia/games
    50: <LI>Smaller hard drives for corporate/office work
    51: (mostly documents)
    52: </UL>
    53: <LI>Speed of processor - higher the number faster it runs
    54: <LI>Graphics Card
    55: <UL TYPE="CIRCLE">
    56: <LI>Some offer dual monitor displays
    57: <LI>Higher end graphics cards allow smoother
    58: motion in videos
    59: </UL>
    60: <LI>Combo drives aren't necessarily better
    61: <UL TYPE="CIRCLE">
    62: <LI>They are better in the fact that you save
    63: space having 2 in one
    64: <LI>If speed is a factor you might want to go with
    65: 2 seperate drives
    66: </UL>
    67: </OL>
    68:
    69:
    70:
    71: <TABLE BORDER="2">
    72: <CAPTION><B><I><A NAME="chart">Notebook Base Model Comparison
    73: Chart</A></I></B></CAPTION>
    74: <TR><TH> <TH><A
    75: HREF="http://img.dell.com/images/global/products/inspn/300m_front_131x145.jpg">Dell
    76: 300m</A> <TH><A
    77: HREF="http://www.alienware.com/Images/Prod_Info_Img/cases/configurator_cases/a51m_new_green.jpg">AlienWare
    78: Area-51m: Sentia Extreme</A> <TH><A
    79: HREF="http://www.sonystyle.com/intershoproot/eCS/Store/en/imagesProducts/180x180/PCGZ1A.jpg">Sony
    80: VAIO Z1VAP2</A>
    81: <TR><TD>Display <TD>12.1" XGA TFT <TD>14.1" SXGA+ LCD
    82: <TD>14.1" SXGA+ TFT
    83: <TR><TD>Memory <TD>384MB DDR SDRAM <TD>1024MB DDR PC-2100
    84: <TD>1024MB DDR SDRAM
    85: <TR><TD>Hard Drive <TD>30GB <TD>60GB <TD>80GB
    86: <TR><TD>Processor <TD>1.2 GHz Intel Pentium M Processor
    87: <TD>1.7 GHz Intel Pentium M Processor <TD>1.7 GHz Intel Pentium M
    88: Processor
    89: <TR><TD>Graphics <TD>Integrated Intel Extreme Graphics
    90: <TD>Intel Extreme Graphics 2 <TD>ATI Mobility Radeon 16MB Video
    91: <TR><TD>Optical Drive <TD>24x CD Burner/DVD Combo Drive
    92: <TD>2x1x8x DVD-RW/16x10x24x CD-RW Combo Drive <TD>24x CD Burner
    93: Drive/DVD Combo Drive
    94: <TR><TD>Price <TD>$1,729.00 <TD>$2,670.00 <TD>$2,999.99
    95: </TABLE>
    96:
    97: <H2><A NAME="glossary">Glossary of Terms</A></H2>
    98: <DL>
    99: <DT>SDRAM (Synchronous DRAM)</DT>
    100: <DD>Slowest of the three standard types of RAM usually runs from
    101: 66MHz-133MHz</DD>
    102:
    103: <DT>DDR (Double Data Rate SDRAM)</DT>
    104: <DD>DDR basically doubles the rate of data transfer of standard
    105: SDRAM by transferring data on the up and down tick of a clock cycle. DDR
    106: memory operating at 333MHz actually operates at 166MHz * 2, as if there's
    107: 2 channels being used compared to the single channel of regular SDRAM</DD>
    108:
    109: <DT>Rambus DRAM (RDRAM)</DT>
    110: <DD>RDRAM is the standard used in today's Pentium 4 machines runs
    111: from speeds from 600MHz-1066MHz</DD>
    112:
    113: <DT>XGA</DT>
    114: <DD>This active matrix dislplay resolution is great for home
    115: applications like web browsing, email and word processing.</DD>
    116:
    117: <DT>SXGA+</DT>
    118: <DD>With 87% more information displayed than XGA, this is an ideal
    119: resolution for DVD playback, advanced digital imaging and various
    120: multimedia applications.</DD>
    121:
    122: <DT>UXGA</DT>
    123: <DD>Can display resolutions of up to 1920x1200 offers 25% increase
    124: in in viewing angle and 20% more brightness than a standard notebook
    125: display.</DD>
    126: </DL>
    127:
    128: </FONT>
    129: </BODY>
    130: </HTML>
     
  8. Aimless

    Aimless Resident drunkey

    Joined:
    Nov 5, 2001
    Messages:
    2,534
    Likes Received:
    0
    Location:
    Wisconsin
    Try putting them inside of <p> or <div> tags.

    I know that is required in XHTML at least :dunno:
     
  9. The DIZ

    The DIZ Guest

    i followed the advice NolanTA gave me about the headers and to put the font below the H1 and H2 lines and that fixed 2 of them
     
  10. carlin

    carlin Guest

    Get rid of the font tags from line 23 and 128. Thats wrong. The font can't have nested <h*>, <ul>, <ol>, <table> tags in it...

    If you want to give something a font style ... you have to
    Code:
    <h1>
      <font face="COMIC SANS MS">
        My fancy font 1
      </font>
    </h1>
    <h2>
      <font face="arial">
        My fancy font 2
      </font>
    </h2>
    
     
  11. carlin

    carlin Guest

    another thing...

    make all u're tags lower case ... (i.e)
    Code:
    <BODY> : <body>
    <FONT FACE="ARIAL"> : <font face="arial">
    
    and so on..

    (this won't give you errors but a good thing to do nonetheless)
     
  12. The DIZ

    The DIZ Guest

    :bowdown: thanks alot
     
  13. The DIZ

    The DIZ Guest

    any other input on how to fix the rest of the errors?
     
  14. The DIZ

    The DIZ Guest

    i see what you were talking about carlin i tried to add the font face to each of the problemed areas and it still came up with errors so for now i just took the easy way out and emilinated the font all together and i'll slowly read up on it thanks for your help
     
  15. Zourn

    Zourn 16-bit Ninja OT Supporter

    Joined:
    Apr 3, 2002
    Messages:
    2,354
    Likes Received:
    0
    Location:
    Texas
    Change your <UL> tags to just <U>

    The <OL> works perfectly fine in my browser (Mozilla Firebird), don't know of a better way to do this.

    The Line 71 <TABLE BORDER="2"> is fine.

    The <DL> works fine in my browser also.
     
  16. carlin

    carlin Guest

    the <ul> and <u> have different meaning so they can't be interchanged. (one is for lists and other is for underline)

    and DIZ, post the html code (not the output from the validator), because I can't tell what you are getting an error on (and btw, use the [code} [/code} tags and replace the "}" with "]" )

    and lookup the info on http://www.w3schools.com/html/default.asp ... it has lots of info on html, xhtml and css.
     

Share This Page