XHTML compliance?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

XHTML compliance

Always
12
46%
Not Important
4
15%
Try my best, but whatever
10
38%
 
Total votes: 26

alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

XHTML compliance?

Post by alex.barylski »

How important is this to you?

I personally don't care...I mean bother?

As long as my site renders and functions almost identically in FF and IE I'm happy...

My HTML is clean and easy to understand and likely looks the same on any device - except for the times I might use complex JavaScript - but still...

It's not like browsers are going to stop supporting deprecated tags, etc...there is just way too many web sites out there which require tags like center

So I ask, whats the deal with compliance anyways, sure standards are nice, but in this case I say not justified :)

p.s-I say this because I just validated my web site and I got 30 errors :)

But it doesn't really bother me...unless someone has a great reason
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

IMHO
I guess the reason for compliance is that you can depend on concrete structure.
If you should parse file or manipulate it in any way....you need common structure (XHTML compliance for example).
Otherwise you cannot rely on anything and will blindly manipulate stuff.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: XHTML compliance?

Post by Roja »

Before I begin, phrasing it as *XHTML* compliance is confusing the isssue.

HTML compliance (in general) is much more important. Going from html -> xhtml is an entirely different discussion.

However, since your post speaks mostly to compliance, let me answer that..
Hockey wrote:How important is this to you?
Critically important. Its like someone trying to sell a box with four wheels as "A car".

Its simply not. If it does not comply to the html standard, it is not an html page. Its tag soup.

Now, as to why making a (compliant) html page is more important..
Hockey wrote:I personally don't care...I mean bother?
I presume you meant "why bother". So lets talk about why.

First and foremost, we are programmers, right? So think about how nice it would be to use part of your content in another page - like google maps. If they used non-standard html, you'd have to write a custom parser for every page you wanted to utilize. Stock quotes? Custom parser. Local Weather? Totally different custom parser. Talk about pain!

The current buzz about "Web 2.0" is about building sites using content from other sites, and providing your content in an accessible fashion to others to do the same. Just like unix, now on the web its "Do one simple thing, and do it well" - hence web api's like ebay, paypal, and google maps.

But thats just for development. Then there is the simple matter of actually letting people see your content. If your site uses non-standard html, I guarantee there are people that can't read it. Whether its people using a screen reader, braille devices, or using a parsing proxy, you are preventing people from seeing your content.

Until you have used those devices, you really have no idea what shortcomings they have when dealing with non-standard html. As a user of accessibility software, I assure you - they are nowhere near as good as IE or FF!
Hockey wrote:As long as my site renders and functions almost identically in FF and IE I'm happy...
Are you coding only for yourself, or for the public?

And even if it is just for you, don't you take pride in your work? You are selling raw lemons and calling them lemonade! Talk about bitter!

Getting your page to validate isn't that challenging overall, and frankly, its only the first step towards great page design. As a bonus, it generally gets you a better page rating too!
Hockey wrote:My HTML is clean and easy to understand and likely looks the same on any device - except for the times I might use complex JavaScript - but still...
The key is "Likely". Your perception and testing of how often it looks the same on "any" device is guaranteed to be limited far below what the public uses. You've probably never even *seen* a braille terminal. Did you know that Verizon Wireless has over 100 different HTML-ready phones in active use by customers? Have you tested your layout in all of them?

No. And you can't possibly expect to. Thats why you code to a standard, and if they dont display the standard correctly, guess what - its their issue to fix. :)
Hockey wrote:It's not like browsers are going to stop supporting deprecated tags, etc...there is just way too many web sites out there which require tags like center
There is a difference between continuing to support old tags, and allowing them to be used in new doctypes.

New authoring programs are removing those tags now. As time goes on, more and more sites will use xthml, and html-strict/compliant, and by doing so, they'll get more consistent rendering in browsers. Thats a win for them. Then they also get css, which reduces bandwidth.

All these little things add up, and eventually, the number of sites with non-standard html will be in the minority, and then browser manufacturers can (reasonably!) stop supporting tag soup.

Sites that don't use compliant html will have no excuse when they do. Whether its "soon" or not doesn't matter. It *will* happen one day, and when it does, you'll be in pain.
Hockey wrote:So I ask, whats the deal with compliance anyways, sure standards are nice, but in this case I say not justified :)
You need to ask the opposite question. Why shouldn't I validate?

If I validate I get:

- Easy programmability
- Guaranteed improved accessibility on mobile devices
- Guaranteed improved accessibility on assisted viewing technology
- Improved ratings in search engines
- Guaranteed support in browsers now and in the future
- Better sites for your portfolio (Resumes with sample sites w/ invalid html shows incompetence)

If you don't, you get none of the above, and you get to be lazy at the expense of potential readers for your site.

I'd call it a no-brainer!

Not to mention, if you have problems validating, I guarantee people on this forum will be happy to help you get there.
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

Compliance FTW!

Roja said everything I wanted to, so ... +1 for him.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Somebody tell me what kind of problem a website will have if it is compliant with HTML 4.01, validates with a HTML 4.01 strict doctype, and complies with CSS standards. Where does XHTML enter the criteria?
RobertPaul
Forum Contributor
Posts: 122
Joined: Sun Sep 18, 2005 8:54 pm
Location: OCNY

Post by RobertPaul »

Bill H wrote:Somebody tell me what kind of problem a website will have if it is compliant with HTML 4.01, validates with a HTML 4.01 strict doctype, and complies with CSS standards. Where does XHTML enter the criteria?
There wouldn't be any problems per se...

As far as I know, the only difference is that compliant XHTML is well-formed XML (and thus parsable with an XML parser) whereas compliant HTML may not be.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Bill H wrote:Somebody tell me what kind of problem a website will have if it is compliant with HTML 4.01, validates with a HTML 4.01 strict doctype, and complies with CSS standards. Where does XHTML enter the criteria?
Yeah, I didn't really hit on the XHTML v. HTML part.. its a bit of a bloody war.

I'll try to explain it this way:

Step 1: HTML and CSS compliance
Step 2: HTML4.01-strict (compliance)
Step 3: XHTML (optional)
Step 4: XHTML-1.1/2.0 (I recommend against this)

What XHTML buys you over html is easier access via programming. You can parse it *extremely* easily, you are embracing the next generation of webpages, and you also ensure much higher levels of compliance.

XHTML is designed to be rigidly compliant. It forces developers to use more meaningful tags, and helps programmers by making a dependable parsing tree.

Unfortunately, due to IE's handling of XHTML, using XHTML today is brave at best. Do a google for serving XHTML considered harmful, and you'll see a slew of pages that go back and forth on how you should and shouldnt serve it, what little benefits there are, and all the things you'll have to do to get around IE's broken XHTML handling.

Virtually every benefit you get from XHTML, you get from HTML-strict, with one exception: XML-driven generation.

XML as the original data source gives you the ability to hook it to outside services (see google maps), setup xml-http requests (aka ajax) calls to it (like gmail), and more. With XML as the original source, you can simply apply an XSL transform, and produce XHTML.

But if your data source didn't start as XML, and you arent doing webservices or similar ideas, the majority of the value is already accomplished in HTML-strict.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Thanks for the explanations. I'm not sure I followed all of that exactly, but I'm pretty certain my sites don't do any of those things.

I answered the poll "Not important" because I don't validate to XHTML at all. I validate to HTML 4.01 strict and css, but have never seen any point in XHTML and I think your answers confirmed that I am okay.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Thought I'd just check in on this issue. Roja has already spoken more than I could think of to write. I'll just say I used to not care. Professionally that's a mistake that has cost me. I'd advice anyone who is in the who cares column to re-read what Roja wrote. If you're still not conviced read it again.

As always thanks for the enlightment Roja!

:D
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

I'll try my level best... but I guess its mostly comes down to time management... if I get enough time between projects I will wholly ensure it to be HTML 4.01 strict compliant... but if projects are choc-a-bloc I guess there will be a trade-off in terms of compliance - like some internal pages may not be compliant...

PS: Roja, I take that to be your longest post. atleast what I have seen upto now :)
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

What's questionable is whether XHTML 1.0 is a task compared to HTML 4.01. I've found its largely down to how you write HTML in the first place. It's quite simple to create an XHTML page simply by following a handful of rules. As for rendering under IE, most of the problems I've come across are largely CSS issues caused by IE not properly implementing things (like an accurate box-model!).

Anyway, it is looking like the IE defense is waning - isn't IE7 on the way...;)
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Bill H wrote:I answered the poll "Not important" because I don't validate to XHTML at all. I validate to HTML 4.01 strict and css ...
Me too.
Anyway, it is looking like the IE defense is waning - isn't IE7 on the way...:Wink:
What the majority of the public uses to browse the internet is one thing but I still have clients (my bread and butter) using NS 4.x on Macs!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Buddha443556 wrote:What the majority of the public uses to browse the internet is one thing but I still have clients (my bread and butter) using NS 4.x on Macs!
Ouch! We finally dropped support for NS 4 last year (although the site still works it doesn't have the styling the other browsers get) and I thought that was late in the game lol.

I code to XHTML strict now because it's neater and keeps the design and layout nice and separate. Didn't have a lot of choice to start off with though because at work we get regularily tested by an outside company who rank us against our fellow local authorities based on how clean the HTML is and how the server responds. Unfortunately, their software is too stupid to take into account DOCTYPE so you have to code to XHTML strict otherwise it chucks up warnings (even if you have perfectly validating HTML code otherwise).

Mac
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

I guess its too much to ask for everyone to wake up tomorrow and say tp themselves, "Hey, I should install Mozilla Firefox today!"...;)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I code to XHTML 1.1 at present. I'm familiar with the differences in the IE implementation of it and I simply workaround them (without even thinking about it most of the time).

I don't only do this for accessibility reasons. If you really pick up how to design web pages in XHTML you'll find creating stylish layouts quickly to be a very simple task (IMO). I can swap things around the page with just a few easy changes, I can add areas to the layout without disrupting the content too much and -- I love this -- I can structure my source code so that the text flows exactly the way you'd be reading it in the browser window.... that's a huge relief for people using screen readers!

Granted, sometime's there are things you just cannot achieve with compliant XHTML... then you have to weigh up the pros and cons of switching to one of the HTML doctypes.

I genuinely find it quicker and easier, and more enjoyable to produce web pages in XHTML than I did in HTML. I certainly take a lot of pride in my work too. Do you never just sit down and mull over your work admiring it? (not in a big-headed way... but if you can't appreciate your won work, nobody else will) I don't just mean admiring what you see in the browser, but also how it flows in the source.

My $0.02
Post Reply