Discover the best of the web!
Learn more about Digg by taking the tour.
55 Reasons to Design in XHTML/CSS
khmerang.com — "In no particular order 55 reasons for me to do “tableless” websites using valid XHTML for markup, CSS for layout and Flash sparingly, only as an ingredient." - I think it's a nice list to begin a discussion with (as if it was needed, heh!).
- 1327 diggs
- digg it
- Milan123, on 10/12/2007, -12/+20XHTML isn't XHTML anymore if you send it as text/html. There are no advantages of XHTML over HTML 4.01 strict right now.
http://jero.net/blog/2005/04/why-html/- MarkByers, on 10/12/2007, -3/+12'XHTML isn't XHTML anymore if you send it as text/html. There are no advantages of XHTML over HTML 4.01 strict right now.'
The solution is to send it as application/xhtml+xml to modern browsers, but send it as html/text to Internet Explorer. Eventually Internet Explorer will support XHTML too, then we can drop that hack. - acorn22, on 10/12/2007, -3/+7"Eventually Internet Explorer will support XHTML..."
In a perfect world, IE would be web standards compliant, too. - riah, on 10/12/2007, -2/+1accept that you could treat your source as valid XML for use in other applications, and with XSL
- MarkByers, on 10/12/2007, -3/+12'XHTML isn't XHTML anymore if you send it as text/html. There are no advantages of XHTML over HTML 4.01 strict right now.'
- aepex, on 10/12/2007, -6/+9Although I fully support XHTML and CSS-based layouts, these particular reasons are kinda....weak.
Example from the site: "CSS files are saved in browser cache for fast retrieval and less bandwidth use"
...Well, yeah, everything is cached, CSS or not, unless a user turns their caching off.- vh1`, on 10/12/2007, -1/+11"...Well, yeah, everything is cached, CSS or not, unless a user turns their caching off."
the point is: external css file is a few kilobytes downloaded once. but if that same css is included in each page, then it will be downloaded each time a page is loaded
you're right though, these reasons are weak. "because they're doing it", wtf? - cathode, on 10/12/2007, -2/+5A lot of really weak reasons.
1) Clean markup eliminates the need for CMS? What a joke.
2) "You will belong in a “movement", make good contacts etc" - Yeah, you're l33t and magically earn "respect"
3) "You can aim to making some money writing a book about it" - Sure, if you could write. - peorth, on 10/12/2007, -0/+2My favourite is "XHTML has a cooler name than HTML"
- vh1`, on 10/12/2007, -1/+11"...Well, yeah, everything is cached, CSS or not, unless a user turns their caching off."
- bieber, on 10/12/2007, -11/+2Who needs 55 reasons?
- ammoniaslip, on 10/12/2007, -17/+6I don't get it. In the end, it doesn't matter how I design the page, as long as it is correctly displayed. If I wanted to throw something simple together and had NO idea about CSS, I'd do a tables-based layout. Then, all the anal computer geeks would begin shouting "OH NOES U USE TABLES OMG", as if anybody cares that my website isn't standards compliant. Big fscking deal.
Now, if we're talking about accessibility, that's another issue altogether. But really, what is the probability that a blind person will want to read my shoddy website anyway?
So, why is everyone so obsessed with standards compliance? As long as it renders OK, it is irrelevant whether I spent 1 hour writing pure XHTML/CSS in notepad or wrote the damn thing in Word and exported it to HTML. It's not as if the browser is in pain when it parses "badly formed" HTML.- thecwin, on 10/12/2007, -2/+5Well one reason for everyone to design at least standards compliant (table for layout doesn't matter provided it's according to standards) is so that browsers can concentrate less on keeping backwards compatibility with sites that depend on previous bugs due to thoughtless design. Maybe if everything was valid, browsers could be leaner and faster than they are currently.
- lo0ol, on 10/12/2007, -1/+4I agree with you, in that the end game should just be about rendering well. However, validating to standards helps with that. It's not always the case, but usually if you code to standards then you have less problems with cross-browser and platform compatibility. The other important aspect to note is that things do change- if you code to standards and a browser changes its rendering a year down the line, it's much more likely your designs won't be broken when that browser makes the changes. Also, there are always browsers out there that you can't really test if you're just coding the page yourself or in a small team. Mobile phone browsers, for example- you can't go out there and test every single phone really. Coding to standards gives you a better probability that your site will work on whichever browser is out there, either now or in the future.
- dave_colorado, on 10/12/2007, -1/+15rendering correctly is the least of your concerns...at least from a software design perspective.
what is most important?
1. The MAINTAINABILITY of your website. You will have to make changes, make it easy on yourself.
2. How UNDERSTANDABLE/READABLE is your code? Others may have to change it, it needs to be readable.
3. Functionality. Now we can talk about your page rendering correctly.
Here's why I think CSS XHTML is better. I recently redesigned my website (30 pages) from HTML with tables to CSS XHTML that is, for the most part, tableless.
What was my big payoff? --
The average page code decreased in code size by about 80%. The CSS solution is 80% less code. That means that I have less code to maintain, it's easier for others to read, and it's faster for me to write.
So your page rendering correctly is important. But it isn't the reason to choose HTML with tables. With any route you take, having a site display perfectly on every browser is a serious challenge. - w0rd, on 10/12/2007, -1/+3Saying "What are the chances that a blind person is going to view my shoddy website?" is like saying, "I don't need a disability access ramp because the chances are slim that that sort of person will visit my store."
- oktobr, on 10/12/2007, -1/+5I use XHTML and CSS because it's much easier to code by hand and minimise file sizes. The file size of your website might not seem like much of an issue, but it's better to survive for 30 seconds after your site hits the front page of Slashdot or Digg than if it only lasts 10.
Also, accessibility is very important, not just for visually impared visitors but for people trying to look at your site using a text-based browser or a hand-held screen.
For true XHTML/CSS evangalism, head over to www.alistapart.com. They have great articles which explain not only how to achieve nifty effects, but why you should care.- ammoniaslip, on 10/12/2007, -8/+1Why should I care how a website is displayed and why should I care whether a web browser chokes while parsing... Are we using this stuff now because it's good, are we just using it just to use it and be the cool cats? That's my problem with this whole evangelism.
Percent of sites that will have to face a digg effect and thus need to be very standardized/small/etc: negligible.
- ammoniaslip, on 10/12/2007, -8/+1Why should I care how a website is displayed and why should I care whether a web browser chokes while parsing... Are we using this stuff now because it's good, are we just using it just to use it and be the cool cats? That's my problem with this whole evangelism.
- BeyondALL, on 10/12/2007, -2/+4This is lame, many of the things in hes list is the same, looks like he tried to make many points over making the points readable..
- tintub, on 10/12/2007, -1/+5Tables aren't obsolete. There is still no decent way to do a grid in CSS (as far as I can see) without using tables. And there's nothing wrong with using a table in this case anyway.
There is a good reason for using CSS. Presentation information is separated from structural and semantic information. The same page can be presented in many different ways without editing the code (e.g. normal web layout, print markup, text to speech browsers, etc.), the HTML code is easier to deal with because it is relatively clean, and changes can be made across the board just by editing one file.- jeffness, on 10/12/2007, -5/+3you can use CSS to do grid like markup quite easily, although there are good arguements against it. Tables still seem to... flow better.
doing tables in CSS feels more like a hack, because you have to use float: left on the cell div to accomplish it, and that can mess up the blocking model in some browsers (even firefox).
for instance, if you do this:
col1 col2 and col3 css markup each have the attribute float: left, with widths defined... or you could define it like this in css if all widths were the same:
.table div div {
float: left;
width: 100px;
}
and then in the .table css you'd have to do "clear: both;" to make it render right.
but yea, it works, kind of hack-y, but it works.
and this is off the top of my head, so if you copy and paste this and it doesn't work, it's because i just typed it up.. play around with it and you'll see what i mean. - cybernetic798, on 10/12/2007, -3/+12Actually even with XHTML/CSS, you are supposed to use tables for data presentation. You're just not supposed to use it for page layout and aesthetics.
- jeffness, on 10/12/2007, -4/+0my post was supposed to look like this, but i missed the edit window:
for instance, if you do this:
<div class="table">
<div class="row">
<div class="col1">
<div class="col2">
<div class="col3">
</div>
</div> - tintub, on 10/12/2007, -1/+4reply to jeffness: (why can't I reply to your post btw do digg comments only allow one level of depth???)
yeah, it can be done, but look at your markup. You are making a table anyway, just calling it something else. That isn't generic, semantic markup... it's still presentation information in the HTML code. It's also a lot more heavyweight than the HTML equivalent. CSS is great, but you have to know not only when to use it, but when not to use it. I'm glad you recognise that it's probably not a great solution and that a table is probably better. Yes it's possible, but the way it has to be done just proves the point that tables are not obsolete. - lo0ol, on 10/12/2007, -1/+2Agreed- tables aren't necessarily bad, either, as long as they contain proper tabular data. The biggest problem I run into today though is vertical centering within a div. It's such a pain compared to the old school ways within a table. There are hack-ish sort of ways to do it, but it still is a pain, especially when you're dealing with data that isn't a fixed height (I usually run into this when I'm trying to vertically center a form element in a header).
- Shinglor, on 10/12/2007, -1/+5Actually there is a way to do grids in CSS using display: table, it's just not supported by IE yet. See http://www.w3.org/TR/REC-CSS2/tables.html
- jeffness, on 10/12/2007, -5/+3you can use CSS to do grid like markup quite easily, although there are good arguements against it. Tables still seem to... flow better.
- fudged71, on 10/12/2007, -4/+1ok boys... i got a question. how can you use a CSS style sheet for google page creator? (i believe i've heard it can be done)
thnx in advance - jeffness, on 10/12/2007, -5/+1typical attention seeking digg post from a site who's narcicistic tendancies outweigh any real content. please, undig and buck the trend of this "noise over substance" trend.
- fudged71, on 10/12/2007, -4/+1dem's fightin' words
lol
- fudged71, on 10/12/2007, -4/+1dem's fightin' words
- jadedknight, on 10/12/2007, -3/+12"39. Blink tag is gone"
Actually its still there.
[CODE]
#div {
text-decoration:blink
}
[/CODE] - SKETCHi, on 10/12/2007, -3/+5Looks like he tried to stretch things out a lot... probably could have done it in a top 10 instead of 55. Still cool though, and some good points were made.
- lo0ol, on 10/12/2007, -5/+3Even though this comment will be buried, I've just got to say a quick hi, SKETCHi. ;) Strange seeing your face pop up amongst these comments. Digg really needs a PM feature so I don't have to jump into public to do this, heh. :)
- genericface, on 10/12/2007, -1/+3I don't think this list adds anything. If there is a reason why people don't use XHTML and/or CSS it is because of lack of ability. I doubt anyone capable of using XHTML/CSS consciously chooses tables over XHTML/CSS.
Reported as lame. - frankiejr, on 10/12/2007, -3/+16I needed only one reason.
Two days ago, I interviewed for a site developer position for a really big web firm I've wanted to work for for a long time. They didn't even interview anyone else because I was the only one that applied with CSS and XHTML skills.
I got the job an no one else even got a reply.
Good enough reason for me.- cavicster, on 10/12/2007, -2/+1Congratulations. That is a pretty cool. What do you guys use for server side code there?
- aThing, on 10/12/2007, -1/+2Most of those aren't very strong reasons. Two good reasons not mentioned in that:
Embedding other XML languages in it (SVG & MathML)
Easy to change the design of your website, just by editing the CSS file.
But most importantly, XHTML goes through an XML parser, so it MUST be standards compliant.- dave_colorado, on 10/12/2007, -2/+1well, there are different DTD's that require/don't require perfectly formed markup.
and even though your code may be standards-compliant doesn't mean that it will render the same way under different browsers. (i hate IE) - aThing, on 10/12/2007, -1/+31. All XML must be perfectly formed.
2. Then that's the browsers' faults. - Bogtha, on 10/12/2007, -0/+1> XHTML goes through an XML parser, so it MUST be standards compliant.
This is not true. XHTML only goes through an XML parser when it is served with the appropriate media type. If you aren't doing content negotiation (bad for caches) and you support Internet Explorer, then you aren't using one of those media types.
Furthermore, XML parsers *don't* require standards compliance. They require that the document is *well-formed*. This is very different to standards compliance.
- dave_colorado, on 10/12/2007, -2/+1well, there are different DTD's that require/don't require perfectly formed markup.
- cybernetic798, on 10/12/2007, -2/+2I think the only reason ppl don't adopt XHTML/CSS model is because so many common tasks require more work now. For example, is not valid in XHTML Strict, you have to use the CSS to make the text bold. Adding all those trailing slashes is also a pain. And let's not get started on browser incompatibilities. Recently I made a new layout for my site in XHTML/CSS and it was only then that I began to appreciate how much work goes into making sites compliant with standards (for the future) as well as compatible with browsers (for today, until browsers get it right).
Luckily, there are many sources to learn from. Apart from books, there are MANY sites that document CSS quirks and tricks and have tutorials:
http://www.alistapart.com/
http://www.mezzoblue.com/zengarden/resources/
http://www.w3schools.com/css/default.asp
I have to say though, that there are so many cool things you can do with CSS, so in the near future sites should be looking pretty slick. Above all though, the biggest reason for me is to simply standardize.- lo0ol, on 10/12/2007, -1/+2I used to be of the same mindset- but when you really start cracking on coding and designing tableless layouts with the style stripped from the HTML, it begins to be second nature, at least for me. I don't know the extent of your ability and don't want to make any judgements on it, but for me it just took time before it just started to be comfortable for me to work like that. Now I really don't think of trying to make sure to add trailing slashes or to not embed formatting- it all just happens naturally.
- Apethanon, on 10/12/2007, -2/+2You don't need to use CSS to make your text bold; just use . Likewise, replaces for italics. Personally, I think this is a change for the better. Bold was often used on long blocks of text that wasn't meant to be emphasized, which is an example where "font-weight:bold;" should be used. For emphasizing text, and are both semantic, and get the job done as easily as and .
Likewise, I find trailing slashes a great improvement. When scanning through the source of a page, seeing something such as appears as if it is missing a closing tag (Even though I'm well-aware which tags don't require a closing tag, it looks like an error when quickly looking through code). Adding the closing slash is only one additional keystroke, and it makes the code so much more readable once you are used to incorporating it.
My biggest gripe with XHTML strict: Removal of the target attribute on anchors. Although it is truely behavorial, and ergo should be handled by client-side scripting, it is a simple enough feature that leaving it in the specs would do no harm. Properly designed links using JavaScript to open new windows are fine, but more and more often sites are using "javascript:window.open(...)" in the href of the link to accomplish the same task. This breaks tab support, and is generally a pain in the ass to all involved (Especially for those who disable javascript). - Haplo, on 10/12/2007, -1/+3"For example, is not valid in XHTML Strict, you have to use the CSS to make the text bold."
What is bold? You mean emphasis, or strong, so use those tags. Yeah, em is one letter more compared to b, and you have to type it twice, but if next week you want emphasis to be bold and having a yellow background, there is only one place to change that, your CSS file. Moreover, for devices that don't render visually, bold is quite meaningless, but emphasis or strong gives *meaning* to the text, instead of a visual trick. - Haplo, on 10/12/2007, -2/+2"often sites are using "javascript:window.open(...)" in the href of the link to accomplish the same task." (Don't we love this 1 level reply system).
javascript:window.open() in the href is plain wrong, see: http://johnbokma.com/websitedesign/intrusion/pop-up-windows.html how to do it the right way.
- VaporBro, on 10/26/2007, -5/+747. XHTML has a cooler name than HTML
- c0uchm0nster, on 10/12/2007, -4/+356. It gives you a reason to write an overly long list about some buzz topics and get your site dugg even though the same worthless content has already been seen on dozens of other blogs before you.
- Twinsen, on 10/12/2007, -1/+0Howabout we ditch HTML/DHTML and standardize on something more relevant to the day and age (something with the expressiveness of Flash but the performance of native interface)! ;o)
http://www.justsuppose.com/blog/2006/03/down-with-dhtml-call-to-arms.html - dave_colorado, on 10/12/2007, -4/+2Apple does a great job on their website. Their site renders very similarly under all browsers.
Here's why:
They aren't using extensive CSS.
They aren't using extensive tables.
They use IMAGES!
It's so simple. Instead of dealing with different stylesheets for different browsers that calculate widths differently, or dealing with standards issues, they make the simple decision to avoid all that.
Looking back on how much time I spent making my site look correct under different browers, I would have had a better looking site done faster if I used images primarily for many parts of my site.
That technique isn't for everyone, but it does make the coding part easier. It's worth a look. However, it's terrible for SEO, unless you have lots of incoming links.- jerven, on 10/12/2007, -1/+2Just remember the alt properties for the blind etc... who cannot parse images :)
- jagnum1fan, on 10/12/2007, -1/+1Also, when you use extensive images, it requires more bandwidth and, therefore more loading time. This is not a good thing for when you might get dugg.
I think there are more disadvantages to using more images than to use less. - aThing, on 10/12/2007, -2/+1So if I'm using a text browser I can't view Apple's site? That could turn away a potential customer.
- maverick3x6, on 10/12/2007, -7/+1don't do drugs.
- rekka, on 10/12/2007, -1/+1I'm inclined to agree with a great deal of that article. I was forced into using tables recently. It wasn't a very pleasant experience.
- andocom, on 10/12/2007, -3/+2Sad to the point of being embarrassing.
"16. Clean markup makes it easier or even unnecessary to build a CMS"
Sure, if its your personal blog or you're a web developer, in which case you probably didn't need a CMS anyway. XHTML has nothing to do with the need for a CMS.
Half the reasons trumpet web standards, the site has a web standards quiz, I find it a little ironic that the web standards quiz page fails the validator he seems so found of linking to: http://validator.w3.org/check?uri=http://www.khmerang.com/webstandardsquiz/
Web standards are great, xhtml has its advantages, but this list is crap and css layouts are no silver bullet. - Jaymoon, on 10/12/2007, -1/+4After years of making website after website using tables, I found it very difficult to convince me to switch. All of a sudden one day, I decided to dabble in CSS, and I made a pretty good site (In my view). After I was done building it, I validated it, and to my suprise, other than small things such as closing self tags ( ), my site had passed validation, and I was pretty proud of myself.
The only benefits I would have to say that I noticed is that it's nice to be able to change values through the .css file, and not have to change EVERY page. Another is that the code is much easier to find what I need to change, and I know that by typing in all my code manually, there's nothing in there that I don't want/need.
One recommendation I would suggest though, is not to use one website as your entire CSS refrence. W3schools is a good site, to keep as a main refrence... But if you ever need to know how to make something, just google it. And don't try the first result you find. The best examples I found were buried deep, and I soon realized that different people have different interpretations of the same thing. One persons "horizontal css menu", is more than likely, completely different from another's..... - Haplo, on 10/12/2007, -3/+41 reason why you shouldn't use XHTML: If it's properly processed by a XML conforming parser if the document is not well-formed *nothing* should be displayed except an error message. Welcome to the 80's.
XHTML is a huge mistake, and people picking it often have no clue. They just pick it because they think it's better compared to HTML. Do the web a favor: stick with 4.01 strict.
For most sites there is no difference between HTML 4.01 strict and CSS versus XHTML and CSS. However, when the latter has (XHTML) a bug, it might show up as just an error message in a browser. Sweet (not)! Especially nowadays, when a lot of pages are generated on the fly, this might be really not what end users want. Imagine using phpBB and suddenly, after a post, you just made the whole board unusable. Cool eh? (not).
I see several people talking about web standards. The only HTML standard is ISO HTML. W3C hasn't published a single standard as far as I know. They publish recommendations and drafts. So talking about web standards is a bit silly, and very confusing.- aThing, on 10/12/2007, -2/+1Imagine trying to learn something cool from a site to find out that it's unreadable tag soup.
Or your site looking totally different on another rendering engine because of a typo. - Bogtha, on 10/12/2007, -0/+1> 1 reason why you shouldn't use XHTML: If it's properly processed by a XML conforming parser if the document is not well-formed *nothing* should be displayed except an error message.
This is not true. If a document is not well-formed, then the XML parser should throw a fatal error. Upon receiving such an error, the user-agent has a number of options - display the content that has already been parsed; reparse the document as something other than XML; display nothing but the error message, etc. Mozilla behaves in the latter way, but it's not required by the specification. The specification only says how the parser should act, not the user-agent.
Unfortunately, a lot of ignorant people think that if Mozilla does it, then that's the way it should be done, so you get these myths springing up that XML requires nothing to be displayed in the case of an error, that XML incremental rendering is wrong, that XML document.write is wrong, etc.
> Welcome to the 80's.
No, welcome to practically any other filetype in the world. What happens if you try and execute a corrupt EXE? What happens if you try and edit a corrupt Word document? What happens if you try and set a corrupt BMP as your wallpaper?
If a file is corrupt, it's perfectly normal to display an error message. We'd be a lot better off if early HTML has this kind of rule, it would have lowered the barrier to entry for browser developers.
> For most sites there is no difference between HTML 4.01 strict and CSS versus XHTML and CSS.
True.
> Imagine using phpBB and suddenly, after a post, you just made the whole board unusable. Cool eh?
Such a situation isn't at all likely. How would such an obvious, glaring bug make it into a final release? In fact, the error handling *reduces* bugs by making them immediately apparent.
> W3C hasn't published a single standard as far as I know.
That depends on what you mean by "published". W3C-authored specifications have gone through IETF standards track, e.g. RFC 2616. - star, on 10/12/2007, -2/+1...
- aThing, on 10/12/2007, -2/+1Imagine trying to learn something cool from a site to find out that it's unreadable tag soup.
- astronaut, on 10/12/2007, -2/+1Aside from the value of making your html pages valid xml and supporting web standards, the best reason to use XHTML/CSS is providing different styles for different media (screen, print, mobile, etc.) Also in modern browsers, CSS actually gives you more freedom in layouts.
XHTML/CSS is pretty standard stuff at this point. If you're a web designer/developer and are still using html 4.0 it might be time to take a class or something.- Haplo, on 10/12/2007, -3/+2Standard stuff? First of all they are no standards, just recommendations. And I recommend not to use XHTML. The whole problem with the X family is that the document *has to be* well formed. On the web this means that bugs in software *do* hurt your visitors. For example, imagine a database connection gone, and the software outputs:
'Can't connect to the database'
and gives up outputting XHTML. What does the visitor see?
Missing closing tag for 'p' at line 1313
That must be quite a lot of fun.
It's like going back to the 90's, when Netscape communicator showed just a blank page when their quite strict parser found an error. They were smart enough to make a better parser. You really want that nonsense back?
Strict parsers are cool for programmers, not for end users. I make my site in several XML files (http://johnbokma.com/ shameless plug), and use a Perl program to parse those files and convert them to HTML. Often I bump into the "parser dies after the first error" *****.
- Haplo, on 10/12/2007, -3/+2Standard stuff? First of all they are no standards, just recommendations. And I recommend not to use XHTML. The whole problem with the X family is that the document *has to be* well formed. On the web this means that bugs in software *do* hurt your visitors. For example, imagine a database connection gone, and the software outputs:
- Speck, on 10/12/2007, -2/+0Aside from standards compliance / browser compatibility, element properties can be accessed with Javascript via the DOM, allowing for some nifty client-side processing you can't get with old-skool table-based layouts.
- Haplo, on 10/12/2007, -3/+3There is *no* reason that this can't happen with HTML. I mean, nobody is going to stop a browser from using XML for representing the HTML parse tree internally (after fixing errors, of course).
- Haplo, on 10/12/2007, -3/+3(Available for 28476 Seconds) that's quite some edit time :-) (And hmmm, doesn't let me edit)
- aThing, on 10/12/2007, -2/+1I got this bug earlier too.
- Matt2k, on 10/12/2007, -4/+3XHTML is a technology designed by people who want to look productive, and promoted by people who want to feel that they're on the cutting edge of something. It offers negligible benefits over HTML + CSS, and instead offers quite a few drawbacks.
Keep on chugging, lemmings.- jinexile, on 10/12/2007, -2/+2Actually it has significant advantages over HTML+CSS the problem is that these advantages cannot be explored in depth without cutting off IE users completely.
- Dradis, on 10/12/2007, -2/+4I honestly don't see what people's problem is with CSS and XHTML. Yeah, so maybe these things aren't the greatest thing since sliced bread, but they're still very good things.
I feel like many people simply hate CSS, XHTML and web standards as a whole because these things are currently 'cool'.. and we all know if something's cool it's got to be popular, and if it's popular it's just lame, right? That kind of logic just isn't, well, logical.
Personally I love adhering to web standards because of many above mentioned benefits (and because it's a challenge sometimes), and I love CSS because I can change my whole site's layout just by changing a few variables. It isn't that big of a deal to use CSS and XHTML. Sure, many methods of using CSS for layout etc. are used in a 'hackish' kind of way.. but guess what? Using tables for layout IS A HACK. Tables were never meant for layout, they were meant to display tabular data (imagine that...).
To all the people above who say that the W3C has never published a standard and that they only publish recommendations.. you're right. However, does this mean that the developer community can't come together and make those recommendations into standards? It seems like you're saying 'no' to web standards simply because noone is forcing you to comply.. which is a pretty weak reason indeed.- Haplo, on 10/12/2007, -1/+2Maybe you should read on up on XHTML. I don't have a problem with HTML 4.01 strict with CSS, but I do have with XHTML. I have explained my reasons in various comments here.
I don't hate web standards, only what most people call standards are recommendations or even drafts. I don't like the HTML standard (ISO HTML) for the simple reason that the width and height attributes are not allowed for images, which has some disadvantages for rendering purposes if people have a slow connection (or the image is big)
"It seems like you're saying 'no' to web standards simply because noone is forcing you to comply.. which is a pretty weak reason indeed."
I am saying no to calling everything a standard when it isn't. I am a professional freelance programmer and love clear communication (which is a must in my line of work). If a customer asks me to make an application that outputs HTML according to the standard I have to make sure if he means ISO HTML (a standard) or mistakes W3C for a standards organization. Just blindly assuming that my customer means W3C is a huge mistake.
As for not forcing, to me it doesn't matter if, for a project, I have to follow a standard, a recommendation, or some doodles on a napkin. I have no problems with adhering to a specification.
I do have problems with XHTML though, the main one is that errors suddenly become the problem of visitors, not of the developer. Which is plain wrong IMNSHO. A better option is to use XML internally, and output HTML 4.01 strict.
Some people think that CSS only works with XHTML, which is a huge mistake. And for most people, what XHTML adds, they are not using. And I have the feeling that most even don't understand what well-formed means, and the issues *your visitors* might walk into.
- Haplo, on 10/12/2007, -1/+2Maybe you should read on up on XHTML. I don't have a problem with HTML 4.01 strict with CSS, but I do have with XHTML. I have explained my reasons in various comments here.
- mixd, on 10/12/2007, -3/+3Hey, did they say CSS? I've heard of that before, I think I'll digg it! Wow! CSS, unbelievable!
- djrubbish, on 10/12/2007, -2/+1damn, my point entirely. very funny.
- liquidrums, on 10/12/2007, -2/+1Page was lame by simply stating the obvious.
Any designer knows the advantages of using css over flash or some other alternative.- mshaheen, on 10/12/2007, -0/+1But by putting pages out there like this one, it is showing those NEW developers/designers more enthusiasm towards best practices. A list like this is obviously not applicable to a seasoned designer. But to someone just getting started it is probably refreshing to see.
- cwmonkey, on 10/12/2007, -3/+2If you're having troubles with or not seeing the advantage of css+xhtml you're doing something wrong.
learn2code - Marshy, on 10/12/2007, -4/+2i really dont need a reason to use CSS thanks.
anyone who "designs" with html is an idiot - Dradis, on 10/12/2007, -1/+0Haplo: I agree with you on many of yoru points. I was more addressing people like ammoniaslip and his/her comment of "Then, all the anal computer geeks would begin shouting 'OH NOES U USE TABLES OMG'". That kind of mentality strikes me as having a hate-on simply because many other people like it.. which makes no sense, and is juvenile. Fundamentally I take issue with people who write off those who adhere to XHTML and CSS as lame trend-riders.
(Following is not directed at you, Haplo, but just in general)
I think one of the best things about the push for standards (or rather recommendation) compliance is that it's making people more aware of their code, as well as how users access it, and who. Specifically I'm thinking of increased accessibility for the disabled. Ammoniaslip's comment about blind people is just ignorant; why wouldn't a blind person want to read his/ her site? To adopt the vantage point that disabled people will never visit your site and therefore you don't need to accomodate them ENSURES that they will never go to your site. It's not that difficult to create a site that is, on the most basic level, accessible to the disabled.- Haplo, on 10/12/2007, -2/+1"compliance is that it's making people more aware of their code, as well as how users access it, and who."
But not by bothering visitors who have often no idea about code, and often really don't care. XHTML is just that: bothering your visitors with bugs, in a big way. I rather see a part of a page compared to a parsing error. Moreover, how many people are going to contact the webmaster telling him/her that they got a parser error? Don't be amazed if your visitor thinks that your website has a virus...
"Specifically I'm thinking of increased accessibility for the disabled."
How does HTML prevent this?
XHTML, when not well-formed, prevents access to most people.
- Haplo, on 10/12/2007, -2/+1"compliance is that it's making people more aware of their code, as well as how users access it, and who."
- stuntant, on 10/12/2007, -2/+0Amen
- Haplo, on 10/12/2007, -2/+1"Imagine trying to learn something cool from a site to find out that it's unreadable tag soup."
Run it through HTML tidy
"Or your site looking totally different on another rendering engine because of a typo."
What does your visitor prefer? Seeing something different or: "Missing end tag for 'p' at line 1313" on a blank page?
Don't forget that a lot of pages nowadays are spit out on the fly. One can't guarantee that all are 100% error free unless each page is first checked for well-formedness locally, and then fixed, and then returned. Funny for the happy few, but don't expect it on a site near to you.
XHTML works because most browsers at the moment accept it as HTML tagsoup.
Like I already said: Netscape Communicator used a very strict HTML parser. They dropped the strictness. Guess why...- Haplo, on 10/12/2007, -1/+1Forgot to mention that it's perfectly possible to make hard to read code using XHTML. Some people think that a language somehow is able to teach people to code readable. A joke.
- aThing, on 10/12/2007, -2/+1I'm gonna stop this long debate. I don't think either of us will change the other's opinion.
- Bogtha, on 10/12/2007, -0/+1> What does your visitor prefer? Seeing something different or: "Missing end tag for 'p' at line 1313" on a blank page?
That's a false dichotomy. Those aren't the only two options. Where's the QA?
> Don't forget that a lot of pages nowadays are spit out on the fly. One can't guarantee that all are 100% error free unless each page is first checked for well-formedness locally, and then fixed, and then returned.
Three mistakes:
1. You don't have to guarantee 100% error free to avoid XML parser problems, you have to guarantee that the document is well-formed. A document can be well-formed and still have errors in it.
2. You don't have to check for well-formedness locally in order to guarantee that what you are outputting is well-formed. Two examples of where it is not necessary are where you build the output tree with the DOM or similar API, and where you generate the output with something like XSLT.
3. Even if you were checking for well-formedness locally, it doesn't mean you have to do it for each request. Once per update would be effective.
> Like I already said: Netscape Communicator used a very strict HTML parser. They dropped the strictness. Guess why...
I don't believe that. Netscape's browsers have been lax since at least Navigator 1.1. It seems to me they have been getting stricter (entities, table layouts, stylesheet media types, etc).
- dv8withn8, on 10/12/2007, -2/+1Wow, this would be relevent a few years ago.
- Haplo, on 10/12/2007, -2/+1"1. The MAINTAINABILITY of your website. You will have to make changes, make it easy on yourself.
2. How UNDERSTANDABLE/READABLE is your code? Others may have to change it, it needs to be readable.
3. Functionality. Now we can talk about your page rendering correctly.
Here's why I think CSS XHTML is better."
Nobody is stopping you from maintaining one or more XML files on your computer, translating them to HTML 4.01 strict, and uploading it to your website. It's what I do with http://johnbokma.com/ . It's the advantage of XML locally combined with the advantage of HTML 4.01 for the end user, who doesn't need to be bothered with well formedness.
As I maintain the XML files (I use several, grouped by "topic" more or less, for example each month in my blog goes in its own file) and I know how much fun a parser dying for each single error is. You *don't* want to bother my mom with such issues (she might spank you.. (hi mom!)).
So, locally I have the whole she-bang of XML. Why can't others think this up, and just want to bother the end-user?- popstalin, on 10/12/2007, -0/+0The only reason I could think that XHTML could break any kind of web application is if it was coded wrong to begin with. I recently went through this with our web developers who swore up and down the reason their code was breaking was because of XHTML. In a sense they were correct because they were declaring IE specific element tags. Once they used standards-compliant code, problem solved. I often find it is web developers who have the most issue with standards compliancy and fight it tooth and nail--at least that's how it is in our shop--because they don't want to have to learn anything other than what they did during their Microsoft Certification class. As a matter of fact, he went right to the Microsoft site to research the problem, who of course didn't have the solution.
- hanslope, on 10/12/2007, -2/+0This list smacks of being how to be an anal retentive in 55 easy steps, or a geek code of HTML conduct
- Chupatumama, on 10/12/2007, -0/+0CSS to design web pages?
You dont say?
What will people think of next?
Fave Firefox extensions?
