i'm using
<script type="text/javascript" >
document.write("<marquee scrollamount='5' onMouseOver='this.stop()' onMouseOut='this.start()'><img alt='ibm' src='images/ibm.png' width='100px' height='100%' /><img alt='tcs' src='images/tcs.jpg' width='100px' height='100%' /><img alt='hp' src='images/hp.png' width='100px' height='100%' /><img alt='hcl' src='images/hcl.jpg' width='100px' height='100%' /><img alt='cts' src='images/cts.jpg' width='100px' height='100%' /><img alt='accenture' src='images/Accenture.png' width='100px' height='100%' /></marquee>");
</script>
for marquee picture in my website, but when i'm checking my webpage into W3 Validator , then i'm getting error on the above code.
Need help to solve the above problem !!
The problems are explained in your question.
marquee
is an old Microsoft thing and it should not be used.onMouseOver
is also not a defined attribute. You could use onmouseover
, but rather, use unobtrusive event handlers.Some bonus tips...
document.write()
or the marquee
element in this day and age. Both can be achieved using more elegant and powerful means in JavaScript.img
elements width
and height
attributes should never include px
.type
attribute is no longer required on script
elements if the script type is text/javascript
.