Tale of the Cave

Tale of the Cave

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Tags  (Read 908 times)

OnewingedDragon

  • Through the Fire and Flames...
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 1266
  • Alignment: Chaotic Neutral
  • I'm pleased to note I may going insane.
    • View Profile
Tags
« on: July 19, 2007, 02:56:13 PM »
I made a webpage for the heckuvit yesterday and this did not happen to me although I have read on multiple occasions that it is bad to overlap tags as opposed to nesting them.

What is the difference and how can it cause problems with the page, or whatever else you might use tags for.?
Logged

ScienceFair

  • Full Member
  • ***
  • Offline Offline
  • Posts: 390
  • Alignment: Neutral Good
  • Worst icon ever?
    • View Profile
Re: Tags
« Reply #1 on: July 19, 2007, 06:23:28 PM »
Nesting tags is like doing this <text><Italics>blah</italics></text>  When you over-lap it'd be like <text><italics>blah</text></italics>

If you pretend that <text> is a command that allows you to state how the text should be displayed then in the example that overlaps the coding the browser or whatever is reading your programming may have no idea what </italics> refers to... You have to remember that machines are stupid and won't understand things like typos.

Basically that means that if you over-lap your coding then the second code or the overlapping one may never actually be processed, so you can't be sure, unless you're really experienced with the language that what you write will show up how you thought it would, especially when it comes to multiple programming languages.

So... you use nested tags to make sure what your program actually happens the way you expect it to...

Granted I haven't really programmed for like 5 years, but I hope that makes sense...

This only really matters when you start getting somewhat complicated though...
« Last Edit: July 19, 2007, 06:26:54 PM by ScienceFair »
Logged

OnewingedDragon

  • Through the Fire and Flames...
  • Global Moderator
  • *****
  • Offline Offline
  • Posts: 1266
  • Alignment: Chaotic Neutral
  • I'm pleased to note I may going insane.
    • View Profile
Re: Tags
« Reply #2 on: July 19, 2007, 06:29:28 PM »
Basically a more tags there are the more important it is to nest?
Logged

ScienceFair

  • Full Member
  • ***
  • Offline Offline
  • Posts: 390
  • Alignment: Neutral Good
  • Worst icon ever?
    • View Profile
Re: Tags
« Reply #3 on: July 19, 2007, 06:34:15 PM »
Basically, you should nest as a general rule, because any failure to nest can result in the complete failure of your programming to work how you expect it to...  and the larger the program the harder it is to find where you messed up if you don't do it naturally... Granted you don't have to program with it, but if you don't... and ignore it for awhile and then go back to it wanting to change something you might be pulling your hair out.  :-D

Meh, whatever... I'm a fool.  Mike can set you straight.
« Last Edit: July 19, 2007, 06:39:54 PM by ScienceFair »
Logged

Mike Caron

  • Administrator
  • *****
  • Offline Offline
  • Posts: 1243
  • Alignment: Chaotic Good
  • I do say, squee.
    • View Profile
    • WWW
Re: Tags
« Reply #4 on: July 19, 2007, 07:19:51 PM »
It's like this. Consider each tag to be a box:



This represents Text. As you can see, all the tags are neatly contained within their container. The boxes are physically confined to the box they are contained in.

Now, consider what happens to the fabric of reality if we allow the box borders to cross:



What? The box is half in, and half out of the outer box?! That's not physically possible!



Alternatively, you can consider that it's the rules of the language, and breaking them isn't something you have the authority to do.

ScienceFair

  • Full Member
  • ***
  • Offline Offline
  • Posts: 390
  • Alignment: Neutral Good
  • Worst icon ever?
    • View Profile
Re: Tags
« Reply #5 on: July 19, 2007, 09:55:09 PM »
Yay, that's pretty much what I was trying to say... but Mike rocks and those pictures Rock.
Logged
Pages: [1]   Go Up
« previous next »
 

Page created in 0.224 seconds with 15 queries.