I'm not sure if this is the correct forum... it involves HTML code, not game-making code.
So anyway, I'm kind of new to HTML... well, not exactly
new... I learned HTML back when it was very different... back when all tags were done in caps and closing tags on single-tag elements weren't needed and there was no CSS (example:
I learned:
<CENTER><IMG SRC="http://www.google.com/images/srpr/logo3w.png"></CENTER>
Instead of:
<img style="display:block;margin-left:auto;margin-right:auto;" src="http://www.google.com/images/srpr/logo3w.png" />
However, I've learned just about all the differences so it doesn't really matter.
I am confused about a few things though...
First, what is the difference between XHTML and well marked-up HTML besides the DOCTYPE and the fact that instead of writing
<html> you write
<html xmlns="http://www.w3.org/1999/xhtml"> and the fact that a few HTML attributes are not included in XHTML? Are the two compatible... I mean could I literally take my web page and change the DOCTYPE and the
<html> tag and have it work as XHTML (as long as I haven't used any attributes that aren't valid in XHTML)?
Also, what really is the point of HTML when XHTML exists? It sounds as if XHTML is better, so why should I ever use HTML?
Second, I'm confused about DOCTYPEs as they didn't exist when I learned the language. I see that there's strict, transitional, and frameset... I don't understand the purpose. If I write code that follows the strict standards and I give it the frameset DOCTYPE then will it still run fine? If so, what's the point in even using strict if frameset allows for strict along with other stuff?
Third, there's this "validator" program at
http://validator.w3.org/ ... I assume that what that does is checks the code for errors. However it always finds a ton of errors in my code that I know are not errors at all. In fact, giving it Google as the page to check gives 32 errors and there's no way that there could be that many as it runs fine for everyone who uses it. It also tends to find tons of errors in my javascript scripts saying that they aren't valid HTML (but of course they aren't valid since they
aren't HTML). Should I ignore those errors... more importantly should I ignore this validator altogether?
Lastly, I'm curious... what would an older browser do when it comes across a tag that didn't exist at the time? Will it ignore the tag or will it print the tag to the page as if it was text?