I hear all about XHTML... but I can't understand the meat of it:
Does it make webdesign better?
Do all browsers support it?
Do all GOOD, BY THE BOOK coders do pages in XHTML now?
Thanks!
| SitePoint Sponsor |
I hear all about XHTML... but I can't understand the meat of it:
Does it make webdesign better?
Do all browsers support it?
Do all GOOD, BY THE BOOK coders do pages in XHTML now?
Thanks!




xhtml is the W3C's attempt at making coding websites more standar. It is just like html, but a little bit more strict. It really says you have to have all the closing tags, and everything has to be lowercase, and you gotta use quotes, and yatta yatta yatta, all in the name of standards. It's good, yeah, but making the switch will be hard, because sometimes coding too strictly for standards leaves some browsers out... and that isnt good.


Coding in XHTML over HTML is not that much of a change IMHO, I have found the transition extremely smooth, and if you are wanting to still use some HTML properties, you can use XHTML Transitional which is exactly what it is meant for, for people going from plain old HTML to XHTML.
Check w3schools.com XHTML section, it alone should bring you up to speed in a short time![]()





To quote Ian Glass in another thread
An excelent beginners guide to XHTML is the NYPL Style Guide which basically cuts down and rewords the W3c notesAnyway, XHTML is pretty simple to learn, and I suggest that be your starting point. In fact, why not learn it right now?It's really simple...really. ;-)
- Quote all your attributes ( <a href="http://a.com" title="A.com"> );
- Close all your tags ( <p> </p> and <img ... /> );
- Nest tags logically and properly ( <p><em>text</em></p> );
- Learn about which tags and attributes were dropped in XHTML (particularly 1.0 Strict).
Absolutely no question, yes.Originally posted by luchazard
I hear all about XHTML... but I can't understand the meat of it:
Does it make webdesign better?
If it's coded correctly, then yes. However, not all things will look the same in all browsers. All browsers can access the data, which is what's important.Originally posted by luchazard
Do all browsers support it?
Yes, those coders do...Originally posted by luchazard
Do all GOOD, BY THE BOOK coders do pages in XHTML now?
Thanks!
~The Artist Latterly Known as Crazy Hamster~
922ee590a26bd62eb9b33cf2877a00df
Currently delving into Django, GIT & CentOS
I might add the XHTML has been the standard for almost 3 years now. People that are still using HTML need to modernize. You're not doing yourself or your clients any favor by not, especially when HTML no longer gets parsed correctly by browsers cause it's so old.
I'm sorry, but people who use NS4, people who code in HTML are beginning to wear on me a bit. All of these things are OLD news and shouldn't even be an issue anymore.
good luck with your eneavours, though, luchazard.
Aaron
XML (Extensible Markup Language) is a “super” markup language from which programmers can develop other, custom markup languages and specialized applications. XHTML (Extensible Hypertext Markup Language) is one such markup language.
Programmers already use XML for database and catalog work, and XML also acts as the foundation for standard web protocols including Scalable Vector Graphics (SVG), Synchronized Multimedia Integration Language (SMIL), Wireless Markup Language (WML), and Platform for Privacy Preferences (P3P).
Monster's Best Work: Corporate Disk Company, Lupron.com Splash screen, Pablo 3D Art, Toosoon,Aggrenox.
BTW, that's not my quote and I have no clue what XHTML is...but I did stay at a Holiday Inn Express last night.
[narrator in the background: "it won't make you smarter...but you'll feel smarter"]
Monster's Best Work: Corporate Disk Company, Lupron.com Splash screen, Pablo 3D Art, Toosoon,Aggrenox.





XHTML is HTML restructured as an XML application - so to understand what XHTML is you have to understand what XML is. XML is basically a set of rules for defining markup languages, designed to be easily parsable by computers.
HTML is /not/ easily parsable. It allows attributes with or without quotes, the end tags of many elements are optional and it has a very loose set of rules defining what elements can go where. This means that writing an HTML parser is a very difficult task - you have to account for a whole bunch of strange rule exceptions and syntax possibilities. XML on the other hand is much more strict, and thus is it much easier to write software that can understand it - in fact one of the most important rules of XML is that software should deliberately fail to parse an XML document that is not valid (i.e does not follow the rules of XML).
XHTML is HTML done the XML way - in other words it's all (or at least many of) the HTML tags you know and love but with the extra strict rules of XML applied. These rules aren't particularly difficult - make sure tags have a matching end tag, nest things properly, quote your attributes. You also need to add a doctype to the top of your document and it is a very good idea to check that your document is valid XHTML once you have finished it using http://validator.w3.org/
The single biggest advantage of XHTML is that your HTML documents will also be valid XML documents. This means that any piece of software in the world that has the ability to read XML documents will be able to read your XHTML documents (although whether the software will know what to do with the data is another thing altogether). If you ever decide to write some kind of program to processs web pages the usefulness of XHTML will immediately become apparent as you will be able to use XML software tools to process your XHTML pages.
I hope that's clear![]()
files are still saved *.html or *.htm though, right? you dont' have to save files *.xhtml.
Derrick
Creativity is great, but plagiarism is faster!





You don't have to, but you can. I believe all of the following are correct: .xhtml .xht .xhtm .htm .html
Please, correct me if I'm wrong![]()
Mike
It's not who I am underneath, but what I do that defines me.





On a similar note, has there been any word on the release of XHTML 2.0? I take it the project is still going strong, correct?
Mike
It's not who I am underneath, but what I do that defines me.





The first publc draught of XHTML 2.0 was announced a few weeks ago - I blogged it here:
http://www.bath.ac.uk/~cs1spw/blog/a.../08/06/#xhtml2
However, it is unlikely it will be worth using for several years (it will take that long for decent browser support to emerge).
Personally I'm sticking to XHTML 1.0 Strict at the moment and have no plans to change, at least not unless I can see a good reason to.
Bookmarks