English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am validating my web-page and I get this error:

Error Line 190 column 49: an attribute value must be a literal unless it contains only name characters.

...52" height="45" onMouseOver=homeHover() onMouseOut=homelink() onClick="window...

How should I desgnate the value of the attribute to be a function? Should I use ""? ex: onMouseOver="homeHover()"

Everything works fine on the webpage, but while validating it, I get this error.

2006-09-18 10:28:41 · 2 answers · asked by Rockstar 6 in Computers & Internet Programming & Design

2 answers

The reason your code isn't validating is because you didn't use quotation marks around your attribute values (e.g. onmouseover="homeHover()" )

also depending on which doctype you're using I think your attribute names need to be in all lowercase.

2006-09-18 10:35:33 · answer #1 · answered by knieveltech 3 · 1 0

Yup, that guy is right. the reason why they require this " " is to show what the attribute value is. It is good programming practice so that when people read code, it is easy to understand.
If you want to know more
www.w3c.com
www.w3school.com

2006-09-18 17:47:43 · answer #2 · answered by cktan86 2 · 0 0

fedest.com, questions and answers