Question

I'm trying to validate my own code right now. I got the error

"no document type declaration; implying "< !DOCTYPE HTML SYSTEM>""

When i put < DOCTYPE> at the beginning of my code, i get errors for the "&nbsp" i used in my code. i used "&nbsp" to align my numbers.

Is there another code for just SPACE?

this is the outline of my code is:

<html>
<head>
<title>...... </title>
</head>
<body>............</body> 
</html>
Was it helpful?

Solution

Is there another code for just SPACE?

Yes. Try &#160; instead of &nbsp;

<!DOCTYPE html>
<html>
<head>
<title>
</title>
<body>
<div>Just testing&#160;&#160;space</div>
</body>
</html>

jsfiddle example

OTHER TIPS

ensure you have a ; at the end of &nbsp so it's &nbsp;

You can do something like this:

<!DOCTYPE html>
<html>
<head>
<title>
</title>
<body>
</body>

and you can learn more about DOCTYPE here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top