WordPress.org

Ready to get started?Download WordPress

Forums

WordPress uses some bad XHTML tags (5 posts)

  1. robvdl
    Member
    Posted 8 years ago #

    Just installed WP 2.0.2, been using WP 1.5 for a while, anyways, I found the the new rich text editor in WP 2.0.2 generates some invalid Strict XHTML:

    The rich text editor uses the <strike> tag for strikethrough. in XHTML Strict, the <strike> tag has been dropped. The rich text editor should be fixed to use the <del> tag instead, so it will validate Strict.

    Also, I notice there is no underline button in the rich text editor and I believe there should be one, because it's there in the standard HTML editor. If an underline button is added, it should offcourse use the <ins> tag, not the deprecated <u> tag.

    I went straight back to the standard HTML editor, but it would be nice to see it generate better XHTML for those wysywig people out there.

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    WP has never conformed to Strict. A user would need to edit files to render output as Strict.

    Underline is on the way and it does use <u> .. it's the right forum though for the issue to be seen.

  3. ifelse
    Member
    Posted 8 years ago #

    if an underline button is added, it should offcourse use the <ins> tag not the deprecated <u> tag

    If we're going to be pedantic, the ins tag is technically not a replacement for the u tag; the u tag is for underlines whilst the ins tag is to semantically markup inserted items. Using it for underlining is as semantically bad as the old practice of using blockquotes for indentation. The webstandards mechanism of underlining is via CSS; the pragmatic way is via the <u> tag.

    Excuse my little digression:)

  4. robvdl
    Member
    Posted 8 years ago #

    I know, but you don't have much choice, the <u> tag has been deprecated completely in XHTML 1.0, and that's not only in Strict.

    The only alternative way would be to use a style sheet and use a <span class="underline">, but that just seems more work to me.

    Semantic or not, I am going to continue using the <ins> and <del> tags, because they should have never removed the <u> and <strike> tags, and why did they decide to keep the <strong> and <em> tags then?? I mean if <u> has been removed, because it represents layout too much, why did they not remove <strong> and <em>? because they repesent layout just as much as the <u> tag does if you ask me.

    Seems just like a silly mistake in the XHTML design to me.

  5. Cl1mh4224rd
    Member
    Posted 8 years ago #

    I mean if <u> has been removed, because it represents layout too much, why did they not remove <strong> and <em>? because they repesent layout just as much as the <u> tag does if you ask me.

    You'd be wrong, though. The <b> and <i> tags are the equivalent layout tags. The <strong> and <em> tags are semantic, representing strong and emphatic statements respectively.

Topic Closed

This topic has been closed to new replies.

About this Topic