Div coding assistance

  • skyvia
  • Novice
  • Novice
  • skyvia
  • Posts: 32

Post 3+ Months Ago

I am trying to get my head around DIV code tags and want to ask a simple ish question.

If I open a div statement and then open another div statement, how does the page know which closing tag is for which statement, or does it not matter?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

The parser takes the closest closing tag to the open tag to make a complete statement... for example... the closing tag and open tags are color coded below... the ones that are the same color go together.

<div id="tag1">
<div id="tag2">
<div id="tag3">

</div>
</div>
</div>

I don't think I explained that well with words, but that should help you understand... It's like a DIV statement inside a DIV statement.


When you write a DIV statement it looks like:
HTML Code: [ Select ]
<div>
 
</div>
  1. <div>
  2.  
  3. </div>
What you put inside that statement, goes inside it... even if it's another DIV statement.
HTML Code: [ Select ]
<div>
<div>
 
</div>
</div>
  1. <div>
  2. <div>
  3.  
  4. </div>
  5. </div>

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.