Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Replying to Converting HTML over to XHTML
Posted 02 September 2008 - 07:53 AM
Posted 02 September 2008 - 03:39 AM
Can it do more? XHTML 1.0 and HTML 4.01 are equivalent in functions in transitional, frameset and strict modes.
Does it have more options? It can make your code look cleaner, but you can do the same in HTML.
Is it easier? That depends. It certainly isn't harder, but it isn't easier either.
A famous article is this: http://hixie.ch/advocacy/xhtml
In fact, the controversy about XHTML and HTML has led browser developers, a working group called the WHATWG and (later) the W3C to develop a new version of HTML called HTML5. XHTML2 isn't suitable for today's web applications apparently, so HTML5 is hoping to remedy that problem.
Posted 01 September 2008 - 04:32 PM
Can it do more? Does it have more options? Is it easier?
i just don't get why to use XHTML... (but you probably have reasons =\)
Posted 10 August 2005 - 07:05 PM
Posted 15 March 2005 - 05:16 PM
The whole XHTML conversion is bringing the HTML towards XML. The main focus is to concentrate on what the data is and not how it looks. If any of you have seen an XML file then you'll know it only contains data and it doesn't display anything in any special way. The reason fot his is the advancements in technology which means no longer is the internet available only to computers but to PDA's and mobile phones. They have to display that same data on a different screen and will not use the same rendering browsers as computers.
Internet Explorer automatically closes some tags and what not which means a lot of website owners thought there site was completely fine but other devices, and other browsers displayed the pages like they got beat with an ugly tree.
So the internet moved towards a more standards compliant code in which only the data was displayed and they had to follow a certain code. XML was working towards this goal so instead of completely destroying all current websites, they made XHTML which is read the same by most browsers. It now means that your code is more than likely gonna display the same thing in many browsers.
The main advantage of XHTML is it's recommended integration with CSS. XHTML held the data and the CSS displays how the data should look so although it is NOT against the rules to include "bgcolor", "color" and "size" attributes as well as the <font> and <br /> tags, it does defeat the meaning of XHTML and what it's aiming for.
Consider someone who has poor eyesight. Do they want to be squinting to read your tiny text, painlessly trying to stare past the glare or trying to make sense of your funky text? No, they want to be able to literally customise the appearance of the whole interent to suit their needs. Screenreaders for the completely blind, will read out well formed XHTML more sensibly than not formed. By styling your font or page layout in the actual XHTML, you remove this ability and, possibly, dissappoint people.
Another advantage is that you get to describe how your website prints out on paper. Say you have loads of information on a subject, good quality information. It contains links to other passages on the same subject with "click here" links on it. When that is printed out and given to someone who may want to look up that information, what does "click here" mean? With XHTML, you give the links a title, and using CSS skills, tell the printer to print out the title beside the link along with the actual link.
So although the tutorial was very informative, I considerably recommend you to not just follow the mandatory rules, but understand what XHTML is all about and make your site true so that in the future, your site will continue to work effortlessly. So although <font>,<br> and <hr> are technically still allowed, DONT use them because they do not contain any meaning other than for displaying purposes.
Also use other tags that are not widely known, such as quote, code, definitions, abbr and acronym. If you want to read more go to www.htmldog.com.
Learn when to use the correct tags. Don't use tables for layout, only use them to display structured data. Put menu items into an unordered list as they are effectively lists of navigation links. Small things like that.
XHTML is more flexible to all browsers because they will read it exactly the same. How they display it, is entirely different in relation to the browsers CSS support or lack of it. But making it valid XHTML will ensure your site is more accessible as it doesn't rely on the internet browser to be able to know how to close tags for you.
And about the name and ID attribute question. Name is deprecating but it is nowhere near out of phase. If you are familiar to PHP when to find out the variable of a form input box you need name tag. I spent four hours debugging my PHP code to find out why it wasn't working only to find out that i hadn't given the input boxes a name, only ID. So my advice is to include both, since it doesn't do any harm.
And lastly, to add a bit to the tutorial, XHTML must be well formed (nested) so if you open a bold tag, then an italic tag, you must first close the italic tag then the bold tag for valid purposes.
<b><i>Hello</b></i> isn't valid.
To close with a related note, I made a mini site last month that worked on WAP on mobile phones. It was a pretty cool experiment to see the website on both a phone and a computer's browser.
Posted 15 March 2005 - 08:28 AM
Question 1: The thing about name and id, I look at your example and I only see it being used in the input and form tags. How about anchor tags? When you specify an anchor the attribute is also "name", so does that mean I have to do < a id="anchor" > now, instead of < a name="anchor" >?
Question 2: Just checking, is XHTML more compatible with all browsers than HTML?
Posted 25 September 2004 - 09:06 AM
I have a quesion... What makes xhtml better than html? i'm not getting it... I'm so lost lol... Is xhtml more flexible? I've never capitalized my html in things like <html></html>... does that impact anything?
The answer to that is YOU. It's just what W3C (World Wide Web Consortium) recommend, it will eventually replace HTML so it would be wise too. Whatever you are comfortable with, you choose what to do, XHTML helps developers by keeping their code tidy with better syntaxing and removing a lot of elements that are just repeated tags that do exactly the same thing. It's also quite strict to make sure you all stay in line, it follows those rules of XML.
What I'm saying is you don't have to learn another web language, if you know HTML 4.01, then you can easily convert over, it's just like HTML but cleaner and easier to use in some circumstances.
Capitalising tags in HTML 4.01 is no problem, it's still considered valid, this however is not allowed in XHTML, you can view many different sites and they can combine a mixture of tags uppercase/lowercase, poorly indented and written, etc and this is why W3C as well as many other developers felt the need to make it suitable so everyone conforms to the same standards, that way developers can work with each other without being sloppy and knowing that the sites will be well-formed.
You can look at XHTML as the newer version of HTML if you like, I do believe HTML will be dropped for XHTML so it can be seen as this, I'm not expecting another HTML standard. It's just an improvement and at least now the browser wars have minimalised their attacks on the standards. XHTML could be seen as stepping backwards, but if your remember HTML 3.2 (during the browser wars) HTML 4.01 was a definite step back as every browser had a lot of features they wanted.
Posted 25 September 2004 - 03:32 AM
Posted 21 September 2004 - 03:43 PM
Posted 17 September 2004 - 12:41 PM