Buenas ana, para decidir dónde cierras o abres elementos html 5 tienes que pensar en dónde terminan las partes de tu página, por ejemplo el header lo tienes que cerrar donde consideres tú que termina la cabecera de tu página web y así con el resto de elementos ya que cada elemento tiene un significado
Este es un ejemplo de código esqueleto de HTML5:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Esqueleto HTML5 en aprenderaprogramar.com</title>
<meta charset="utf-8">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
</script>
<![endif]-->
<style>
body {font-family: Verdana, sans-serif; font-size:0.8em;}
header,nav, section,article,footer
{border:1px solid grey; margin:5px; padding:8px;}
nav ul {margin:0; padding:0;}
nav ul li {display:inline; margin:5px;}
</style>
</head>
<body>
<header>
<h1>Esqueleto HTML5</h1>
</header>
<nav>
<ul>
<li><a href="http://aprenderaprogramar.com">HTML5 más semántica</a></li>
<li><a href="http://aprenderaprogramar.com">HTML5 más geolocalización</a></li>
<li><a href="http://aprenderaprogramar.com">HTML5 más gráficos</a></li>
</ul>
</nav>
<section>
<h1>Cidudades del mundo</h1>
<article>
<h2>Londres</h2>
<p>London is the capital city of England. It is the most populous city in the United Kingdom,
with a metropolitan area of over 13 million inhabitants.</p>
</article>
<article>
<h2>Paris</h2>
<p>Paris is the capital and most populous city of France.</p>
</article>
<article>
<h2>Tokyo</h2>
<p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area,
and the most populous metropolitan area in the world.</p>
</article>
</section>
<footer>
<p>Esto es un ejemplo de HTML5!!!</p>
</footer>
</body>
</html>