Reputation: 3099
I am getting the following error when opening up my page in Firefox (other browsers don't show this error). I am using HTML5 and if I try to put closing tags on the input, then the page fails validation.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge" >
<!--... more here...-->
</head>
<body>
<!--... more here...-->
<input type="text" id="wall_color_picker" onclick="startColorPicker(this)" title="Wall Color" value="#FFFFFF">
<!--... more here...-->
</body>
</html>
Edit 1: Firefox version is latest (59.0.2 (64-bit))
Edit 2: Response headers:
Cache-Control max-age=604800, public
Connection Keep-Alive
Content-Type text/html; charset=UTF-8
Date Tue, 24 Apr 2018 16:04:19 GMT
Keep-Alive timeout=5, max=100
Server Apache/2.4.6 (Red Hat Enterpri…penSSL/1.0.2k-fips PHP/5.6.35
Strict-Transport-Security max-age=31536000; includeSubdomains;
Transfer-Encoding chunked
X-Powered-By PHP/5.6.35
Upvotes: 7
Views: 2467
Reputation: 2098
TL;DR Your browser is reading your html in an older format
I'd like you to try two more things
In Firefox, select View Page Info from the context menu, and look for Render Mode.
Update to Firefox beta 60 Help -> About Firefox -> Update
It would seem that your browser is reading your code in the XHTML format which requires strict tags among other things. Ensure that your firefox is up to date, and also replace this line:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
with this:
<meta charset="utf-8">
Reason:
Upvotes: 1
Reputation: 388
It seems the Firefox version issue. I have tried that code snippet in Firefox 43.0.1 and found OK. You can please update the Firefox version.
Upvotes: 1
Reputation: 2114
Because your <input>
has no content allot of times people do not close the tag <input></input>
but in your case close it at the end of it like so <input type="text" id="wall_color_picker" onclick="startColorPicker(this)" title="Wall Color" value="#FFFFFF"/>
Please try the following,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge" >
<!--... more here...-->
</head>
<body>
<!--... more here...-->
<input type="text" id="wall_color_picker" onclick="startColorPicker(this)" title="Wall Color" value="#FFFFFF"/>
<!--... more here...-->
</body>
</html>
Hope this helps
Upvotes: 1