Jump to content
xisto Community
Rokuso

Which Is Better?

Recommended Posts

Actually XHTML is really very easy to learn. If you know how to code in HTML, you'll really get the hang of XHTML in under 10 minutes. I did. A good tutorial site is http://www.w3schools.com/ IT's a great way to learn XHTML.Basically what it is is that you end elements that need no closing tags with a "/" before closing it with a ">"for example: instead of <img src="something.jpg"> IT would be <img src="something.jpg" />1. All is changed is from "<>" to "< />"Another thing to remember is to make all elements "lowercase"for example: instead of <IMG> it'd be <img>2. <HTML> to <html>Lastly, put all attribute values between "quotes"3. <element attribute=value /> to <element attribute="value" />PS: There's one more thing to add which is to place xmlns at the header but I got too lazy to look for it so if someone would be kind enough to give it to him that'd be cool. Thanks

Share this post


Link to post
Share on other sites

Yes HTML is easier than XHTML but i reccomend you to start coding with XHTML because is the future, as everything that is new to someone its required a bit of practice to learn it but when you catch it you will noticed that it is not difficult at all.Best regards,

Share this post


Link to post
Share on other sites

I use XHTML 1.1 which only comes in STRICT. A simple yet valid document is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/; xml:lang="en">  <head>	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />	<title>Your Title</title>  </head>  <body>	<h1>Simple XHTML</h1>	<p>See it was simple</p>  </body></html>

XHTML should actually use the Content-Type application/xhtml+xml but since IE still refuses to fix up their browser to work correctly with it, they rather fix bugs instead (which is good, but will they ever get round to doing this?) it's better to serve it as text/html until all browsers support it, or you could use my PHP server-side script for sending application/xhtml+xml to browsers that do support it.

I prefer XHTML 1.1 over HTML 4.01, not because there's much difference but due to XHTML being more stricter and resulting in cleaner code by deprecating elements and attributes that were either double-ups or could be done within CSS.


Cheers,

MC

Share this post


Link to post
Share on other sites

Yes, I also recommend to start learning from xhtml and not from html4 as the code usually is more cleaner and usually valid and due to that you have more chances that on different browsers your webpage will appear in the way you want to, but xhtml isn't new html, it was created for purpose with xml data storage and needed to be strict that it would work correctly, the html4 replacement will be html5 which as I understand is available or almost available, but isn't announced as some kind of a standard and besides if it will be announced as a standard by the w3.org, I still won't be using it, as many browsers will need time to upgrade their engines, which usually takes over two years, but as things are going faster these days, it can be faster, but as other object of discussion, xhtml2 will also appear in the market or call it whatever you want and I don't even know what could be used at all, a lot of who thinks that hml4 doesn't have any future and that text/html doesn't have it too, but if talking from the practical side, xhtml with css and js stuff are quite good and usually works, the only problem is the ajax, which could have somekind of a standard to to adopt to all the browsers in the same way and could be coded easier. In fact, html doesn't matter so much today, but that is just my opinion, due to we have CSS, which needs to move forward, we use html just to created somekind of a body of the page to be usable with CSS, all we need is div and p, br, a and ul,li etc. some people doesn't even use such tags as img.. but anyway, knowing how works html4 Today is a good practice to, especially for web designers, who might need to edit something and etc. ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.