Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This code still has one warning in html code validator. What I still need to insert into it?

Tags:

html

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 :)

like image 990
Marcelo Noronha Avatar asked Dec 05 '11 20:12

Marcelo Noronha


1 Answers

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.

like image 180
Jason Gennaro Avatar answered Dec 20 '22 22:12

Jason Gennaro