Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

X/HTML or HTML 5 - which replaces what? 4

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Where is the current situation with semantic, current standards websites?

I've used X/HTML 1.0 Strict for a while now, but that doc type seemed to die a death as 1.1 requires the actual server to provide the website in XML, which most don't.

Should I forget X/HTML and move onto HTML5?

Is HTML the way forward, or are webservers going to change and enable X/HTML to become the markup of the future?

When X/HTML 1 came out , I was given the impression that it replaced HTML 4 , but I now get the feeling X/HTML has been replaced with HTML 5

I'm a bit confused over which way I should go and so your guidance is appreciated.

Regards,
1DMF



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
Hi

XHTML's main feature was the "X" for extendable. Almost nobody used that feature. Most of the world used XHTML only because some articles made the impression it was trendy and XHTML became a buzzword, not because they actually needed it.

So W3C announced that XHTML 2 Working Group Expected to Stop Work End of 2009, W3C to Increase Resources on HTML 5.
An Unofficial Q&A about the Discontinuation of the XHTML2 WG said:
Did the W3C kill XHTML2?
No, XHTML2 was already dead for all practical purposes due to its failure to be backwards compatible and its failure to deliver compelling new features. The W3C just announced they will take it off life support.
( An Unofficial Q&A about the Discontinuation of the XHTML2 WG )

Regarding HTML5, its support is far to be full, but anyway, we rarely need all of them. For whatever features you need, see their support on When can I use... and decide yourself whether HTML5 already brought something useful to you.

HTML5 was designed with compatibility in mind, so HTML and XHTML syntax are both accepted. That would mean, you can start by changing only the [tt]DOCTYPE[/tt]s first, then make more changes as they become necessary or you have time.


Feherke.
 
Hi

1DMF said:
1.1 requires the actual server to provide the website in XML, which most don't.
Please note that this is not only the web server's fault. Document delivered as [tt]application/xhtml+xml[/tt] should be parsed as XML. And XML parsers do not tolerate syntax errors. That means, they stop on the first error. So for example the MIME::Lite TLS Email Encryption SendMail.pm | Perl v0.02 beta should also be displayed as blank with only one error message, if it was indeed handled as XHTML document.


Feherke.
 
Thanks feherke,

It was this forum that turned me onto X/HTML, but it certainly looks like it's time to consider moving away from it!

And yes, I know my pages no longer validate, mainly due to the FB/G+1 plugins, so I haven't been 'strictly' strict for a while!

If having even 1 error in the XML markup would stop delivery of the webpage, then it's a no brainer which way I should be moving!

Cheers for the insight!

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
When X/HTML 1 came out , I was given the impression that it replaced HTML 4 , but I now get the feeling X/HTML has been replaced with HTML 5

XHTML was NEVER intended to replace HTML 4.01 but as feherke says some people (who obviously don't actually READ specifications but like to think they know everything about it) gave web developers the impression that if they didn't validate at XHTML strict they were obviously lacking as a developer and were totally "unkewl" as a human being.

Right now, and until HTML5 reaches recommended status which will be (2014 according to the W3c), HTML 4.01 strict is the highest standard of HTML. XHTML strict is just a kind of design snobbery.

Should you use HTML5 now? You can if you wish, just keep it in mind that support for it in the most popular browser family is still pretty sketchy. (and that's being kind :D )
Using IE9 scores 141 + 5 bonus points out of 475, which is the LOWEST out of all current browsers.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Phew, then I got a little while before I need to worry about moving away from X/HTML!

Dunno about snobery but I do try to do the best I can when ever I code, and yes I did think that X/HTML 1 strict , and W3C validated meant I was doing the right thing?

That's not a bad thing is it?



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
You could validate to HTML3.2 and STILL be "doing the right thing"

W3c validation is basically a spelling test, not a testimony to your coding skills.



Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Yeah I guess, but we could all be using IE4 and windows 3.11 for workgroups if we wanted, but we don't.

That isn't the point is it!

3.2 is not the latest standard, at the time X/HTML 1.0 was.

I wish to keep up with standards and good practices, hence using CSS not tables, but of course YMMV.

I am eternally grateful for the advice Jeff, Dan, Phil, feherke, and all the other usual suspects, including yourself!, who gave me a good kicking when I first came here and appreciate them elevating the standard of my coding and the syntax I use, bringing it inline with acceptable, modern day best practices.

OK, I'm not perfect and don't always get it right, but at least I try!

If that's snoberry, then I guess we are snobs and proud of it!

As you know I'm not down with the school of SEO'ers that think , "shit code is OK, as long as google likes it!"

OK, you can have latest standards and 100% semantic, validated code, but if your website sucks, then it's irrelivant.

However, I've yet to see a job advert who requests HTML3.x or even 4 for that matter, they currently want X/HTML or HTML 5! including CSS3!

Finally we can give objects rounded corners without a gazzilion nested divs and background images!

Keeping up with the jones is snobbery, keeping up with technology is essential.










"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
3.2 is not the latest standard, at the time X/HTML 1.0 was.
XHTML has NEVER been the latest standard for HTML, and there is no stipulated requirement to be using the "latest" specification. You should use the appropriate document type declaration for the type of coding you are doing, NOT the latest simply because "it's there" and has a later recommended status date.
If THAT were the case MathML should be the doctype of choice because it was given recommended status in October 2010.

Using XHTML without a real need for the extensible capabilities is just as "semantically incorrect" as is using a target attribute in HTM4.01 strict.

The code you need to use in the document dictates what DTD to use, not, the other way around.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Well said Darryn
most people who write job adverts have no idea what is really required.
Just look at all those that explicitly request MS office 2007/10 whatever when what they really mean is "someone who can type on a word processor"

once you know the correct processes the exact model of tool used is not important as long as it is used correctly.

Computers are like Air conditioners:-
Both stop working when you open Windows
 
Well this is new to me Chris as that's not the impression or advice I got from this forum many years ago.

But I guess attitudes change and buzzwords come and go.

I like the XML syntax because it makes sense to end tags that don't have an actual closing tag by default such as img, input etc..

I like the mindset and the way it makes me think about what i'm coding and the way I code it, but you are right, I'm not even sure what 'extensible' actually means, in the XML context.

IP/Darryn -> it makes no difference, if a job requests HTML5 & CSS3 and you don't have that on your CV , don't expect to get an invite for an interview, no matter how good you think you are at coding in any other specification!

Of course you could always lie, but then if it turns out they actually want a certain skill and you don't have it, you wont last very long.

The code you need to use in the document dictates what DTD to use, not, the other way around.

So how do you go about making this descision? Can you give me some pointers please..

Are you advocating that I should look at each individual page on my website , the content it contains and alter each DTD to refect this?

So my entire website will be made up of a mish mash of varying doc types?

I guess this also means I have to remember every doc-type, what tags are valid and the syntax for each doc type?

Regarding MathML - what's current browser support like?



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
Short history of html: HTML1,2,3,4, XHTML, HTML5.

Indeed I don't see XHTML as a successor of HTML4, it was a partly reinvention, of course with strong similarities, as it still is the hypertext markup language. It was a prallel branch to HTML4, surely with extended set of features.

But I see HTML5 as a merger of HTML4 and XHTML and that means HTML5 is to aim for in the future or - depending what you do - now.

I still did create a small web page in HTML4, where it was totally sufficient, last year. Partly because some js component used better suited into that doctype.

I'm only a part time webdeveloper anyway, but HTML5/CSS3 today is a strong foundation already, for development aiming smartphones. See phonegap for example.

Bye, Olaf.
 
What Chris is saying is that you need to look at your website code as a whole and see what it requires.

If you need frames for instance in a single page, then maybe that page can use the frames doctype just to deliver those frames, but the rest of your site would be a standardized doctype. If you need
custom tags for xml data in most pages then you can use XHTML.

HTML 5 brings many new things to the table, but still maintains most of the features from HTML 4 and some XHTML. While some browsers may not understand the newer things of HTML 5 they can read and render the ones that were continued from HTML 4.

For most things you do, you should be using HTML 4 strict or HTML 5 unless you have a specific requirement to use XHTML, frames or something else.









----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
I appreciate the frames and even transitional DTD if you want to break strict, such as using deprecated attributes.

I was just clearly under the wrong impression, that XHTML superceeded HTML4. - not that it matters!

But it's soon to become mute as I will move to HTML5 once it is fully supported.

I'm sure it will have some goodies up its sleeve I will have fun utilising!

Just like the fun i'm having getting to grips with JQuery :)

Plus if it allows XHTML syntax which I prefer, it won't really affect how I currently code my mark up.

As always thanks guys, much appreciated.



"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

MIME::Lite TLS Email Encryption - Perl v0.02 beta
 
Are you advocating that I should look at each individual page on my website , the content it contains and alter each DTD to refect this?
Yep, each and every page is an independent document, and if one page requires a different DTD then so be it.

If a page has an iframe in it, you should use a DTD that allows the use of the target attribute on anchors without it being a frameset. A page with only tabular content could use a 3.2 DTD and XHTML DTDs are for pages that are created from XML documents using XSL/XSLT

A DTD is a specification for the document (page) not the entire website. Realistically it is just the widespread use of templated websites and content management systems that has led us to this idea that all pages on a "site" should be uniform in structure and design no matter what the topic, and therefore HAVE to use the same DTD.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top