Log in

View Full Version : Explanation needed!



The Smoking Gun!
01-05-2008, 12:59 AM
Can some one specifically explain the differences between HTML XHTML and now DHTML along with the notations between loose, strict and the versions, does one do more than another does one have better search engine crawling results than another? As I go traveling to websites have made it a habit to check the page source and i cannot find a correlation between the different uses of all these different options of coding a web page/site, i have seen highly interactive and functionality in old HTML sites as well as very poor navigation and utter frustration getting around XHTML STRICT sites, I mean aside from what I see in the changes in syntax in the tags such as /> instead of just > in a statement tag or meta tag, I just can't seem to discern a pattern or advantage of using one over the other, besides the fact that you can now use .css to style the page layouts and reduce the need for frames and tables to create containers, which of course saves allot of individual page coding, but this works with all f them as well, so still I don't get it!

Thanks,

TSG!

djr33
01-05-2008, 10:32 AM
HTML is the base for the others.
HyperText Markup Language.
It's an old standard made for design. It isn't technically programming-- it's markup. It does tags which will then make different things happen on a page. <b>bold</b>, and things like that. Fairly simple, but also very limited, compared to any programming language.

DHTML is the use of CSS (Cascading Style Sheets, for design/styling) and Javascript (for dynamic pages and interaction) to create a 'better' DynamicHTML.

XHTML is the use of XML to make a new version of HTML. Note that HTML is currently version 4 (and there were other versions before now). There will never be an "HTML 5" because XHTML is being developed. It has many more options than HTML, though also a similar (but more strict) format, so it seems like a good option. However, Internet Explorer doesn't support it. Once Internet Explorer fully supports this (and old version of Internet Explorer fall out of use), this will be a good option. Now, it's all but worthless because so many people use Internet Explorer.


Strict doctypes are best, because we aren't really transitioning any more. Transitional (loose) is basically outdated.


XHTML requires the self closing tags like <br />, which is one reason it's stricter than HTML.


This won't really make any difference for search engines, as long as it is all properly coded and setup correctly. Note that Javascript and other dynamic things on a page might not be read by a search engine.

BLiZZaRD
01-05-2008, 05:09 PM
Actually, HTML 5 is coming, and it will be strong and it will probably phase out XHTML into a void of nothingness in which it (XHTML) deserves.



This new version of HTML—usually called HTML 5, although it also goes under the name Web Applications 1.0—would be instantly recognizable to a Web designer frozen in ice in 1999 and thawed today. There are no namespaces or schemas. Elements don't have to be closed. Browsers are forgiving of errors. A p is still a p, and a table is still a table.

At the same time, this proverbial unfrozen caveman Web designer would encounter some new and confusing elements. Yes, old friends like div remain, but now HTML includes section, header, footer, and nav as well. em, code, and strong are still present, but so are meter, time, and m. img and embed continue to be used, but now there are video and audio too. However, closer inspection by the caveman designer would reveal that these elements aren't that different. Many of them might be things the designer needed back in 1999 but didn't have. All these new elements are easily learned by simple analogy with elements the designer already understands. In fact, they're a lot easier to learn than Ajax or CSS.


http://www.ibm.com/developerworks/library/x-html5/

http://www.whatwg.org/specs/web-apps/current-work/multipage/

Twey
01-05-2008, 05:19 PM
XHTML requires the self closing tags like <br />, which is one reason it's stricter than HTML.XHTML is not stricter than HTML. HTML has very strict validation rules. XHTML is simpler than HTML: it uses only a small subset of SGML's features. Also, browsers tend to require XHTML to be well-formed (but not valid) before parsing it. This, unfortunately, eliminates progressive rendering from the equation, which is a feature users seem to like. If you're considering using XHTML for the Web, you should read this article (http://www.webdevout.net/articles/beware-of-xhtml) first.

djr33
01-06-2008, 09:26 AM
What's your definition of stricter?
XHTML requires all tags to be closed (a worthless rule, because self closing tags are by definition closed regardless of slashes), and it also is strict about lowercase or uppercase letters in tags.

Twey
01-06-2008, 09:45 AM
HTML demands compliance just as much as XHTML. There are just more rules to which one can choose to comply. For example, in HTML this is valid:
<p>A paragraph
<p>Another paragraph</p>... because there's a rule that says that if an opening <p> is encountered whilst a <p> is open, the first <p> should be closed.