smashingmagazine.com — Beautiful HTML is the foundation of a beautiful website. When I teach people about CSS, I always begin by telling them that good CSS can only exist with equally good HTML markup. A house is only as strong as its foundation, right? The advantages of clean, semantic HTML are many, yet so many websites suffer from poorly written markup.
Nov 12, 2008 View in Crawl 4
1longtimeNov 13, 2008
Agreed.Out of 12 suggestions, I think the validation is the least important (unless you're talking about accessibility checks for blind/mouse-less navigation, which is pretty important).My advice: look at the other 11 suggestions and don't obsess over a green validation bar vs. red.
meep3dNov 13, 2008
I'm with you on this. My source PHP files look great, while the rendered output generally looks like crap.if you have a function like createFormSelect ( $array, $default ); there is no real feasible way of making it pretty and correctly indented.
wolfingNov 13, 2008
Bah, who needs CSS when you have tables baby yeah! embedding 8 tables is fun! (if you like the funny stair-type looking text in your HTML code that only shows 3 letters after the 4th embedded table and makes you scroll your source left and right to see anything type of thing and yes this is sarcastic and yes I hate punctuations I think they're overrated)
drewbe121212Nov 13, 2008
and what happens if browsers stop supporting the old stuff? Keep up with the times, shesh! Standards are their for a reason. To FOLLOW them.
yuanzhouluNov 13, 2008
@jektalanswer: it's simple. anything that isn't closed already should be auto-closed by the parser. that way, also, leaving stray [b] tags lying around won't have any effect because they'll be closed right after.having parsers do this isn't going to break inter-browser operability. point is, the web WORKED before.also, javascript used to be simple:[script language="javascript"]document.write("blah");[/script]i could rememeber this. i could code things in 5 minutes. i could code and work while offline and on the go. it was fabulous.now i have to constantly check up references because i have to do some s**t like this:[script type="app/javascript"][[![[cdata][[ ]][[]]][/script]heck, i can't remember it.the point i'm trying to make is there's a lot of unnecessary bloat in XHTML that HTML didn't have, and plain HTML is easy for people to remember, AND WORKED.my pages aren't about cats. i have made corporate and school webpages before. and they DO work in all browsers, render properly, and everything, and have never broken. they follow all standards of HTML. NOT XHTML no thank you.[xhtml] should automatically be replaced by the parser with all that DOCTYPE xmlns crap if it wants to do that. i'm all for eliminating redundant mess like that. why include all this stupid xmlns="www.w3.org/s**t" if it's going to be in every single document! get rid of the redundancy! executables are beautiful, they begin with MZ or ^?ELF. shell scripts are beautiful, they begin with #! followed by the parser to use. HTML, beautiful also because they beign with [html].now, XHTML begins with [DOCTYPE !! // DTD // ISO-9600 / ?!! !!2348923// ][html xmlns="www.w3.org/s**t"] ??? you expect me to remember that? you think i can code s**t while offline?
tporter72Nov 14, 2008
He seems more like a winblows userDELTREE /Y c:
wumbusNov 14, 2008
In fairness, the author of this article doesn't actually operate the site. He's a guest post. So it's not his fault that the site he is posting on has issues.
Closed AccountNov 14, 2008
why this guy got dugg down? he's correct.
svivianNov 14, 2008
Not worth removing indentation, if you gzip the output then you barely save a couple of bytes.I agree about the wrapper divs. The main reason is if you want different backgrounds - there are often times when you need to overlay backgrounds.
yoctoyottaNov 23, 2008
Rebuttal to yuanzhoulu:Hi yuanzhoulu, I'm interested in hiring you to create something exactly equal in functionality to digg.com and nytimes.com. Please work within the frameworks you've laid out in your posts above.Thanks!
orlandu63Nov 27, 2008
HTML is a markup language, not a programming language. Now stfu.
findhostcouponsMar 22, 2009
Thanks for all these important tips on optimizing HTML code!