HyBriD54 0 Report post Posted October 7, 2008 Does anyone here use XHTML? If you do so, why?I'm told XHTML is just "strict" HTML (for example, you have to use <br /> instead of <br> because the tag has to close itself or something), but what is the advantage of using a "stricter" form of HTML? Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted October 7, 2008 As I understand it, Xhtml is Html getting ready for the use of Xml in your site pages.But I only know that from reading stuff. I don't write Xml, so I really do not know the usages.Xhtml is a stricter language in terms of its syntax and stuff, like no nesting of tags, must be closed, etc, but it really isn't any tougher to write. I learned to write html, then Xhtml, but am now moving back to Html 4.01 Strict Doctypes since using Xhtml is pointless for me since I don't use Xml. And IE has issues with Xml anyways, so why lose that bunch of Browsers for thatb reason? I recommend Html 4 Strict. Share this post Link to post Share on other sites
xpress 0 Report post Posted October 7, 2008 (edited) Yes I am using XHTML. Don't worry about it. Simply think XHTML is latest version on HTML. XHTML is based on XML(EXtensible Markup Language). XML allows web developers to specify what things are (for example if you want to create an employee, it concentrates on his structure name, branch, salary etc...) rather than how to present them( what is its color, font etc..). XHTML is mixture of these two technologies XML and HTML. Don't worry if you can't understand this. Simply XHTML concentrates on structure of the page, rather than its presentation. XHTML and HTML are almost same, but XHTML is some what strict. Just use these tips to convert HTML page into XHTML XHTML rules 1. All element names must be written in lower case. 2. All tags are paired or have a /> ending tag.(That is why <br /> because in HTML <br> is an empty tag). 3. All attribute values must be surrounded by double quotes. (e.g, color=red is incorrect. color="red" is correct) 4. All attribute values must be presented as name=value pairs. 5. DOCTYPE statement must be used. Some advantages of XHTML over HTML are, 1. It makes your source code is clean. So easier to maintain. 2. A well structured XHTML page can be easily displayed on mobiles and handheld divices. So it is future ready. 3. No browser incompatible issues. No worry. and many more advantages are there. They are somewhat more technical. Edited October 16, 2008 by xpress (see edit history) Share this post Link to post Share on other sites
miladinoski 1 Report post Posted October 7, 2008 Sorry to bring the possible off-topic in here but I want to make a statement: ...And IE has issues with Xml anyways, so why lose that bunch of Browsers for thatb reason?...You are wrong. If everybody didn't make their pages to look good in IE using alternate stylesheets and so on, people would eventually switch to another browser, and that move will make MS think of how are they destroying the web with proprietary functions only included in their browser and not supporting the standards which are set by W3. Stop coding for IE and make people switch from the ugly antique browser. BTW, HyBriD54 you can also find good info on W3.org about web standards. Share this post Link to post Share on other sites
Saint_Michael 3 Report post Posted October 15, 2008 (edited) Like the rest of the posters XHTML is primarily used for display XML data like RSS feeds for instance and so the structure of XHTML has to be strict enough in order to display XML data properly without causing any errors. AS for the advantages if you look at the browser wars and how the different browser display websites and so it is all about identify your tags, CSS etc etc. Like it was mentioned earlier its about organizing and keeping your source code clean. Edited October 15, 2008 by Saint_Michael (see edit history) Share this post Link to post Share on other sites
triplebtalk 0 Report post Posted January 2, 2009 I use XHTML and it is no different to HTML except for closing tags, in fact I find it better because you make less mistakes when you use HTML. It is not so good when you are writing in standard HTML and you keep accidentally crossing the languages over Share this post Link to post Share on other sites
pasten 0 Report post Posted January 26, 2009 Apart from some of the above answers what I know is, XHTML will standardize the coding format to be viewable in most of the devices including computers like Mobile phones, PDA etc ie. most of the other platforms. The reason is that the technological development of browsers in other platforms are not as matured as in pc, hence they will be able to directly take the advantages of stricter xhtml. Share this post Link to post Share on other sites
Baniboy 3 Report post Posted January 26, 2009 I use XHTML and it is no different to HTML except for closing tags, in fact I find it better because you make less mistakes when you use HTML. It is not so good when you are writing in standard HTML and you keep accidentally crossing the languages overtriplebtalk, did forget that you can't make the style in xhtml?Anywayz, the code is much easier to write and analyze when the markup and the style are in different document.Also it makes the file size much smaller for example when you have several div elements and all the pages have the same template.for example:<style type="css/text">#divelement { float: left;}</style> When you have that piece of code (usually more) in like every 100 pages on your website then it will take a lot extra space.When you put that on a css file then you can link it to all your pages taking much less space. Now css can be used with regular html too but xhtml kinda "makes" you learn css and useit, that's my point.Now to the topic title; "What's the point of xhtml?"Well the idea is, if your code is crap, then it will look crap. That's what makes xhtml so awesome, you can't make much mistakes without the whole page getting that screwed-up look. That means it is most likely that the same page in FF will look the same in IE and Opera. Portable, small devices don't have the resources to solve the code that a computer can in it's own "top-level" browser. It's like a ubdated version of html and you should use it, I still can't get it why some people make it so big deal of learning something new, well listen you didn't learn html in 1 hr either did you? Share this post Link to post Share on other sites