Viewing 5 replies - 1 through 5 (of 5 total)
  • Try it now – every error line should be a clickable link that takes you to the location of the error.

    And just to clarify: this is not a PHP validation thing, it’s your bad XHTML code!
    Here is the school: https://www.w3schools.com/xhtml/default.asp

    Thread Starter drursi08

    (@drursi08)

    Thanks for hte tips moshu!

    “The center element is not supported in XHTML 1.0 Strict DTD.”

    Does this mean that <center> cannot be used for a site to xhtml validate?

    dave

    Thread Starter drursi08

    (@drursi08)

    OK I removed the center tags but now the blogrolls look all messed up to me in Firefox ( https://area51.sevenstripes.com/ )

    Plus I’m getting div tags as being called depreciated / invalid in XHTML. I use the div tags to make a small box for several blogroll entries to be put into, while the rest fall down lower in the box (see the blogrolls on sevenstripes.com/blog to see what I mean)

    Why were these depreciated if they can still be used to sort out web design? Are there any alternatives I can use for <center> and <div>?

    Thanks.

    I am afraid you don’t read carefully the error messages…
    “div” elements are NOT ‘depreciated’ (whatever that means) – you just put them in the wrong place ??
    99% of the WP themes are built using divs, so they are very valid building blocks.
    However, nesting the elements in XHTML is tricky: e.g. you have <div> inside of a paragraph [<p>] and those are inside of a list item [<li>].

    For center – you can always have a div class=”center” and define it in the stylesheet:
    .center { textalign: center;}
    For divs – just use them correctly!

    Thread Starter drursi08

    (@drursi08)

    Thanks so much moshu.

    As for the “deprecated” bit (not depreciated, that was a typo), I saw that here: https://www.w3schools.com/tags/tag_div.asp

    ————
    Differences Between HTML and XHTML

    The “align” attribute of the div element was deprecated in HTML 4.01.

    The “align” attribute of the div element is not supported in XHTML 1.0 Strict DTD.
    ————–

    I took that to mean that one cannot use the code and have it check out as XHTML valid. Guess I was wrong, but then again, I’m still really new to coding/programming/etc!

    Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Quick Validation Help!! Cannot figure out <center> align problem.’ is closed to new replies.