SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    xhtml validation issues in wordpress

    Hi guys am trying to get my site validated and have got the following errors. Any ideas how I can rectify this

    The default scripting language must be specified for an intrinsic event:
    <div class="details" onmouseover="this.className='details2'"
    onmouseout="this.className='details'">

    I think it has something to do with the content type in my header which I have the following
    Code:
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    Any ideas guys???

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use event attributes (instead of external, unobtrusive scripting, which is what is recommended) you should state which scripting language you use. For a <script> tag it's not necessary, since it's stated in the required type attribute. But for attributes containing script code you should explain what language it is.

    You do this with the Content-Script-Type HTTP header (or a meta equivalent):
    Code:
    <meta http-equiv="Content-Script-Type" content="text/javascript"/>
    I don't know of any browser that doesn't assume JavaScript for undeclared script code, but the HTML spec says you should be explicit about it.

    Using external unobtrusive scripting would be much better, though.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats brilliant cuckoo thanks a lot. Hve only got the following error now The default style sheet language must be specified when style attributes are used: .......any ideas bout that one??

  4. #4
    SitePoint Evangelist
    Join Date
    Feb 2005
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry that was thick....have worked it out cheers

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the same sort of issue. If you use style attributes instead of external CSS style sheets (<link rel="stylesheet".../>) or internal style sheets (<style>...</style> tags) you should declare the style sheet language with the Content-Style-Type HTTP header or meta equivalent.
    Code:
    <meta http-equiv="Content-Style-Type" content="text/css"/>
    Edit:

    You posted while I typed.
    I'll leave my explanation, though, since it may help someone else who stumbles over the same problem.
    Birnam wood is come to Dunsinane


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
  •