SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    UL Class & W3C Validation

    I think that I am correct in stating that validating your HTML file with the W3C validation utility will not always corectly validate your file, though it can show you the most obvious errors you couldn't see.

    Maybe someone knows if this is an error or if W3C is just incorrect. I wrote a rule to use circles in an undefined list. The HTML is <ul class="contents">

    But when I validate this page the validator states "Error: element "UL" not allowed here; possible cause is an inline element containing a block-level element."

    But where else can you place the element other than inside the <ul> tag????????

    The page it's on is http://www.stnorberts.com

    What are your thoughts?

  2. #2
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the FONT tag in the line above it that's the problem.
    Code:
     120: <font size="-1">
     121: <ul class="contents">
    FONT is an inline element and UL is block-level; inline elements can't have block-level stuff in them. :-)

    http://www.w3.org/TR/html4/struct/global.html#h-7.5.3

    You shouldn't be using FONT tags anyway! :-p

    ~~Ian


Bookmarks

Posting Permissions

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