need nesting of divs explained
Can someone please explain the nesting of divs? In the example below the head div has 2 id's but only one closing tag before you get to tagline, while the "tagline" has one?
It was my understanding that if you had a <div id""> you also needed a </div>. Not the case below. Before you get to <div id"tagline"> shouldn't there be another </div> for <div id="sitebranding">?
This is an example from a sitepoint book on html.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<title>Bubble Under - The diving club for the south-west UK</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<p>Diving club for the south-west UK - let's make a splash!</p>
</div> <!-- end of header div -->
<h2>Welcome to our super-dooper Scuba site</h2>
<p><img src="divers-circle.jpg" width="200" height="162"
alt="A circle of divers practice their skills" /></p>
<p>Glad you could drop in and share some air with us! You've
passed your underwater navigation skills and successfully
found your way to the start point - or in this case, our
<p>Bubble Under is a group of diving enthusiasts based in the
south-west UK who meet up for diving trips in the summer
months when the weather is good and the bacon rolls are
flowing. We arrange weekends away as small groups to cut
the costs of accommodation and travel and to ensure that
everyone gets a trustworthy dive buddy.</p>
<p>Although we're based in the south-west, we don't stay on
our own turf: past diving weekends away have included
trips up to Scapa Flow in Scotland and to Malta's
numerous wreck sites.</p>
<p>When we're not diving, we often meet up in a local pub
to talk about our recent adventures (any excuse, eh?).</p>
<p>To find out more, contact Club Secretary Bob Dobalina on
01793 641207 or <a href="mailto:firstname.lastname@example.org">email
</div> <!-- end of bodycontent div -->