thank you, i understand the concept of self closing tags, i think. basically, if there's nothing that is to be displayed in the browser window directly, it can be self closed?
Kind-of, but not quite. IMG for example shows something, but is considered an "empty" tag.
The concept of "empty" tags in the specification means a tag that cannot wrap other tags or CDATA (character data, aka text). For example:
Is invalid gibberish, you don't use image or BR that way. Neither of those can 'wrap' other tags or flat text.
At the same time:
Is NOT considered an "empty tag" by the specification, even if it is 'empty'... because it CAN hold other tags or text.
The HTML specification uses the word "empty" a lot, but when they say it they don't mean a tag that doesn't contain anything, but one that cannot contain anything... a subtle philosophical difference lost on many, particularly the XML crowd.
Really that's the only major difference between XHTML 1.0 and HTML 4.01 is how 'empty' tags are handled.
<br> -- HTML
<br /> -- XHTML
<img src="temp.png" alt="html way">
<img src="temp.png" alt="xhtml way" />
That's the 'big' different twixt the two. Laughably, browsers don't ACTUALLY care, which is why HTML 5 lets you blindly mix-and-match them. (honestly it's one of the things I don't like about HTML 5, adding to the laundry list of things just plain wrong with it)
For reference if you need it, the following are the 'current' tags that you can 'self close' for being 'empty':
AREA, BASE, BR, HR, IMG, INPUT, LINK, META, PARAM
There are others like INDEX, BASEFONT and APPLET, but really you have no business using those on any website written after 1997.
Of course it's subtle distinctions like that which can drive you nutters if you're just starting out learning. WORSE, many alleged "experts" STILL never took the time to learn them, which is why so many websites are buggy broken wrecks. See the entire crowd that still writes their code like it's 1997, and until recently were throwing the 4 tranny doctype on it; today that's the crowd embracing HTML 5 while still sleazing out the same garbage code.