This is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
It seems I have a problem here:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type='text/javascript'>
function run(){
var div = document.createElement('div')
div.style.position = 'absolute'
div.style.left = '0px'
div.style.top = '0px'
div.onmouseover=function(){
alert('mo')
this.style.opacity = 0
}
div.style.width = '30px'
div.style.height = '30px';
div.style.backgroundColor = '#000'
document.body.appendChild(div)
}
onload = run
</script>
<title></title>
</head>
<body>
</body>
</html>
What do I still need to insert or edit, so my code becomes fully ok in code validator? Thanks :)
There is no problem with this code when dumped into the Validator using direct input
http://validator.w3.org/#validate_by_input
The one warning you get is
Using Direct Input mode: UTF-8 character encoding assumed
which you can safely ignore. It just means that UTF-8 is assumed on direct input.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With