This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25004 - class attribute marked as error on script tag elements on XHTML 1.0 validation
Summary: class attribute marked as error on script tag elements on XHTML 1.0 validation
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-11 12:35 UTC by Lucas Ponce
Modified: 2014-03-11 12:55 UTC (History)
0 users

See Also:


Attachments

Description Lucas Ponce 2014-03-11 12:35:33 UTC
According with :

[1] http://www.w3schools.com/tags/tag_script.asp
[2] http://www.w3schools.com/tags/ref_standardattributes.asp 

Tag <script> should support "class" atttribute as it's a glogal attribute.

In the W3C validator

[3] http://validator.w3.org/

This example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Minimal XHTML 1.0 Document</title>
    <script class="test" type="text/javascript"></script>
  </head>
  <body>
    <p>This is a minimal <a href="http://www.w3.org/TR/xhtml1/">XHTML 1.0</a> 
    document.</p>
  </body>
</html>

Fails with error:

Line 8, Column 19: there is no attribute "class"
    <script class="test" type="text/javascript"></script>

When it should pass test.