Another strict question

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

http://validator.w3.org wrote:
Image Line 19, Column 17: there is no attribute "language".

Code: [ Select ]
<script language="JavaScript" type="text/javascript">




You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


Why not? I don't really understand.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

The type attribute refers to a standard mime-type.

A mime-type is more of a standard, or generic, method of describing the resource than language.
To a browser they mean pretty much the same thing.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6254
  • Loc: Seattle, WA

Post 3+ Months Ago

Quote:
language - Specifies the scripting language. Deprecated. Use the type attribute instead.


Pssst! You might want to bookmark this page ;)
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Okay. Thanks.

I bookmarked that page spork :)
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

If you look at a DOCTYPE, you'll usually see a link to the actual DTD.
Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
This is a normal text file & can be opened in Notepad & examined.

You'll see sections that begin with
Code: [ Select ]
<!ELEMENT

Those start the definition of an element that's allowed in that document type.

Usually immediately after those sections you'll see
Code: [ Select ]
<!ATTLIST

Those define valid attributes for the element that has its' name follow.

For instance, here's the definition of a script element in the DOCTYPE listed above.
Code: [ Select ]
<!-- script statements, which may include CDATA sections -->
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
 id     ID       #IMPLIED
 charset   %Charset;   #IMPLIED
 type    %ContentType; #REQUIRED
 src     %URI;     #IMPLIED
 defer    (defer)    #IMPLIED
 xml:space  (preserve)   #FIXED 'preserve'
 >
  1. <!-- script statements, which may include CDATA sections -->
  2. <!ELEMENT script (#PCDATA)>
  3. <!ATTLIST script
  4.  id     ID       #IMPLIED
  5.  charset   %Charset;   #IMPLIED
  6.  type    %ContentType; #REQUIRED
  7.  src     %URI;     #IMPLIED
  8.  defer    (defer)    #IMPLIED
  9.  xml:space  (preserve)   #FIXED 'preserve'
  10.  >
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Oh, okay. That explains and answers some of my questions. Thanks for that joebert.

Can you make other HTML tags with that? Just a question :D
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Theoreticly you can, but getting browsers to agree they should parse those new elements/tags is a different story.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

joebert wrote:
Theoreticly you can, but getting browsers to agree they should parse those new elements/tags is a different story.


Oh, ok. I just thought it would be fun to mess around with that. But nevermind then.

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 27 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.