I have the following HTML code
<html>
<body>
<div id="wrapper">
<div id="header"/>
<div id="main"/>
<div id="footer" />
</div>
</body>
</html>
But using tools like firebug I see the is rendered like:
<html>
<body>
<div id="wrapper">
<div id="header">
<div id="main">
<div id="footer" >
</div>
</div>
</div>
</div>
</div>
</body>
</html>
It’s the standard behavior?
How avoid this intentation of Divs?
<div>is an element with content. You cannot use the self-closing tag (<div />) unless you are using XHTML.Write: