• I have an old premium custom wordpress theme from years ago… I did a validation error check with it, and I managed to get it down to 11 errors to fix. I added some pictures /photos in posts and I have some errors I’m not sure about. I think the theme is using “strict” for Doctype. When I try using “transitional” I have like 600 errors.. instead of 11. I’m not sure why “sizes”, “srcset”, “figure”, “target” would be giving errors when it’s default wordpress outputs unless it’s a bug maybe?

    Examples below…

    Line 174, Column 233: there is no attribute “srcset”

    Line 174, Column 754: there is no attribute “sizes”

    Line 178, Column 42: element “figure” undefined

    Line 215, Column 242: there is no attribute “target”

    Line 25, Column 8: required attribute “type” not specified

    Line 174, Column 15: there is no attribute “class”

    Validation Link

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m not sure why “sizes”, “srcset”, “figure”, “target” would be giving errors when it’s default wordpress outputs unless it’s a bug maybe?

    You answered yourself with this:

    I think the theme is using “strict” for Doctype. When I try using “transitional” I have like 600 errors.. instead of 11.

    It’s 2025 (if I’m not mistaken), and the whole world is on HTML5 now, so WordPress generates HTML5 markup (including what you’re supposing to be a bug), not deprecated HTML 4.0 or XHTML 1.0 code.

    Your site has the XHTML 1.0 Strict Doctype:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    As WordPress (and any plugin that outputs front-end code) is generating HTML5 markup, you’re never going to pass any validation test with this doctype declaration.

    Modern HTML5 Doctype is simply:

    <!DOCTYPE html>

    If you care about HTML/CSS standards compliance, migrate to a modern theme.

    Thread Starter spencerp

    (@spencerp)

    Oh ok, thanks. I like my old theme though, maybe just update it to modern doctype and etc. I could buy a more modern theme, but I like my old custom theme that my site was known for having. I paid 250.00 USD for the theme and hate to abandon it. I’ll see if my buddy can help me with it. Thanks for your reply, you’ve been helpful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.