HTML or XHTML?

What do you use to design your web pages?


  • Total voters
    24

sclewin

New Member
Messages
88
Reaction score
0
Points
0
I find this topic confusing. I have read in several places that XHTML is suppose to be the future and that you should design web pages using that, but, then I notice other people saying that HTML is still the standard because it is used much more than XHTML and supported much better. To add to that is that HTML 5 is in development. If HTML is dead, why is there a new version coming out?
 

kkenny

Active Member
Messages
1,950
Reaction score
0
Points
36
I don't know
XHTML is just basically reformed html, nothing really different about it other than W3C classifies it differently and it has a couple more restrictions than normal HTML does.

XHTML has no proprietary code such as
Code:
<center></center> <marquee></marquee>
and a few other codes. XHTML suggests that you instead use
Code:
<div style="align:center;"></div>
something like that, or use CSS instead of using "proprietary code"


XHTML also requires you to end some of your codes
like this:
Code:
<img src="http://forums.x10hosting.com/programming-help/xxx" />
not this:
Code:
<img src="xxx">

XHTML also requires every tag and attribute be lowercase
Not acceptable:
[CODE]
<ImG sRc="xXx" />
Acceptable
Code:
<img src="xXx" />

XHTML also has some strict standards on spacing, like
Acceptable
Code:
<img src="xxx" />
Not acceptable
Code:
< img src = " xxx " />

And those are the main ones I can think of.
 

LHVWB

New Member
Messages
1,308
Reaction score
0
Points
0
I must say that I prefer XHTML, but mainly because I think that it makes sense to be more restrictive in terms of what you can do with html, I follow the idea that you should use separate css documents to give your website the actual color/theme/style, the XHTML to me is just a general layout.

Its not really that different from HTML, but its moving towards a more 'semantic' web, where you have less things defined in the html, and more in css and 'xml'. XHTML also makes it easier for machines to go through the code, because it removes those annoying mistakes that kkenny pointed out.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
I also prefer to use XHTML, because it forces you to keep a structure in a document. For example, the code
Code:
<i><b></i></b>
Is valid HTML, while this is not allowed in XHTML.

Also, there's nothing 'new' in XHTML compared to HTML, every tagname, etc remains the same, so any browser that knows HTML shouldn't have too much troubles to read XHTML.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
I normally use HTML 4.01 Transitional but I think I could switch to XHTML without doing much re-coding because I'm always careful to close tags in the right order etc.
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
I normally use HTML. The reason why is because that is what I first learned. (Out of an old book which was ancient)
 

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
XHTML is much easier to read and the newest standard. It encourages good coding practice, and results in better standards-based pages. Why not use it?

-Luke.
 

mattura

Member
Messages
570
Reaction score
2
Points
18
xhtml is simply neat html.

If you write neat html, you are probably pretty much in the xhtml mindset.
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
I do write neat HTML but I have never tried xhtml.
*Adding XHTML to the list of things to try*
 

MarioMaster

New Member
Messages
181
Reaction score
0
Points
0
I find this topic confusing. I have read in several places that XHTML is suppose to be the future and that you should design web pages using that, but, then I notice other people saying that HTML is still the standard because it is used much more than XHTML and supported much better. To add to that is that HTML 5 is in development. If HTML is dead, why is there a new version coming out?

Because XHTML stands for Xtended Hypertext MarkUp Language, and HTML stands for Hypertext Markup Language. xHTML is more compliant to XML or something. I don't know.
 

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
Because XHTML stands for Xtended Hypertext MarkUp Language, and HTML stands for Hypertext Markup Language. xHTML is more compliant to XML or something. I don't know.

Correct, it uses the same structure as XML and has the same rules, just that it has a set of elements rather than you just making up and using your own.

-Luke.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
I have heard that search engine bots like XHTML better because it is more SEO friendly and easier for it to read. And XHTML is more compatible in the browsers.
 

Mitch

New Member
Messages
908
Reaction score
0
Points
0
I don't know
XHTML is just basically reformed html, nothing really different about it other than W3C classifies it differently and it has a couple more restrictions than normal HTML does.

XHTML has no proprietary code such as
Code:
<center></center> <marquee></marquee>
and a few other codes. XHTML suggests that you instead use
Code:
<div style="align:center;"></div>
something like that, or use CSS instead of using "proprietary code"


XHTML also requires you to end some of your codes
like this:
Code:
<img src="http://forums.x10hosting.com/programming-help/xxx" />
not this:
Code:
<img src="xxx">

XHTML also requires every tag and attribute be lowercase
Not acceptable:
[code]
<ImG sRc="xXx" />
Acceptable
Code:
<img src="xXx" />
XHTML also has some strict standards on spacing, like
Acceptable
Code:
<img src="xxx" />
Not acceptable
Code:
< img src = " xxx " />
And those are the main ones I can think of.

Thanks for that small xhtml tutorial, i think i use both. So i vote for both in the poll.
 

sclewin

New Member
Messages
88
Reaction score
0
Points
0
I have been doing some more reading and I started building my webpage using xhtml. Even though more browsers may support html, all browsers will still read xhtml. The crappy browsers like IE simply read xhtml as a html file.

I'm pleased at the cleaner xhtml code and I find it easier to debug.
 

Smith6612

I ate all of the x10Pizza
Community Support
Messages
6,517
Reaction score
48
Points
48
I'd choose personally myself, XHTML. Since all browsers can do it when you look at forums, and it's pretty light and flexible, that's why I choose it.
 

cowctcat

New Member
Messages
401
Reaction score
0
Points
0
I use something in between i think its like halfay between html and xhtml. Like i can close all of the tags and stuff correctly but i always forget that document type crap at the beginging and the xmls or whatever in the html tag. too confusing.
 

kkenny

Active Member
Messages
1,950
Reaction score
0
Points
36
I follow Transitional XHTML 4.01 in my sites. i find it pretty ok to get used to. I originally go taugh from my cousin basic 2.0 designs out of HTML, but then I started learning XHTML, JavaScript, CSS, SQL and PHP, and I have found that XHTML code usually works better with PHP and CSS compared to HTML.
 

kkenny

Active Member
Messages
1,950
Reaction score
0
Points
36
I use XHTML usually.



You've got to have an alt in all images :)

Actually, technically not. in XHTML nor HTML do they require an Alternative tag. This is only required when you are checking for... the like accessability or the W3C-A/W3c-AA/W3c-AAA validator.
 
Top