can i have a structure like below?
<div>
<head>
</head>
<html>
<body>
<body
</html>
<footer>
</footer>
</div>
I am asking this because elementor theme editor when ever some content is placed it creates <html><body>
...if i put <html>
in header.php this results in validation failure in validator.w3
can i have a structure like below?
<div>
<head>
</head>
<html>
<body>
<body
</html>
<footer>
</footer>
</div>
I am asking this because elementor theme editor when ever some content is placed it creates <html><body>
...if i put <html>
in header.php this results in validation failure in validator.w3
Can you have such structure?
Yes, you can have such structure.
Is it valid HTML code?
No, it is not.
Will the browser render it correctly?
Most of the browsers deal with code errors pretty well. So yes - I guess it will render correctly, but it's hard to say what errors will it cause later on. It may cause some JS libraries to work incorrectly, and so on.
Should you write such code?
No, definitely not. It's invalid, so it's an error and should be fixed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3/TR/REC-html40/loose.dtd">
this tag gets inserted ..any solution to fix this? – user145078 Commented Dec 22, 2018 at 18:46