(x)html agony aunt

I think it comes down to how the person writing the code gets paid. The people who write the HTML for the big companies are employees so it doesn’t matter to them if the code takes longer to test or is a maintenance nightmare.

Those who just create pages but who don’t then maintain them also don’t care.

It is the small designer who also maintains the sites after they have created them who cares about eliminating as many possible causes of error right from the start by writing valid HTML because to them time is money and so the less time they have to waste on figuring out whether the page is broken in XYZ browser because of invalid HTML the more money they can make.

At the big companies the longer it takes to fix things the more work there is for the staff and they may even get overtime.

Two different approaches both designed to maximise income by doing the opposite of one another.

you are optimistic. i also am an optimistic, just not when it comes to ie. if you ask me (please don’t :)) ie9 sounds more like vista. we’ll see. i hope i’m wrong and we’ll finally have an ie to worry less not more.

since you’ve asked (and i’ve told you not to! ;)) ie9 doesn’t deserve that much attention. it’s not for all platforms, and not even for all still used windows platforms. i don’t expect them to support win98 :slight_smile: but this is a power move right there, making a statement: we will not comply no matter what. and more: want ie9, get w7 (vista doesn’t count, i hope :)). so i’ll wait 'till ie9 is really borne, previews are for money tricks on you :slight_smile: remember directx stopped at v9 for xp? that didn’t do much help for vista, but they try it anyway.

you got me started now, and i’ve told you not to ask! :wink: the final package. what will it be like. minimum requirements, installer, additional software. will silverlight be shoved in the deal? i had to upgrade way too many xp with ie8 to last me for two life times. the process of updating to ie8 still sounds like a nightmare to me: two or three restarts, updates, anti-malicious software thrown in the equation, critical patches after-nightmares. phew! looking at the competing browsers, they sure are making it harder on me to appreciate any new ie coming my way, because the same thing i’ll have to do with any w7 upgrading ie8 to ie9! how much work will this mean? i’m afraid the answer is like always: much more work than it should.

see http://ie.microsoft.com/testdrive/ for access to IE9 preview 4. Since they are making preview versions available they can’t be too far away from having a beta version available.

I agree with you completely - I wasn’t trying to excuse their poor use of code, merely suggesting a possible reason for how it happened. It certainly doesn’t say much for quality control at Microsoft that something like that ends up on the web.

Hopefully that is because all of their quality control efforts are going into their other products although there are plenty of people around who would claim that is a perfect example of the level of QA that Microsoft does:):slight_smile:

yes they are.

in regards to <body>, is having some inline style and js code to it, so its presence is ok, and also it is ok not to use the </body> closing tag, as you suggested.

however, since the opening <html> doesn’t have any attributes to it, its presence isn’t justified, it should have been omitted entirely, like the closing </html> is.

that’s my conclusion also. and they don’t have a company wide policy regarding coding. in other pages, like http://translate.google.com, they do close these elements, even if they don’t have attributes attached.

which is also valid since those closing tags are optional in HTML whether you include the opening ones or not.

My comment about smaller was with regard to leaving out tags - I agree with you that using span tags like that makes no sense. I know Google doesn’t employ anyone who knows what JavaScript is, perhaps they also don’t employ people who understand how to write proper HTML.

nice to know.

they didn’t leave them out, they omitted to close them.

i didn’t want to comment further how their page looks in “all possible browsers” to avoid another dispute.

but i guess that by using a “smaller” <span> instead of a more fitted <div> (since the content is %flow not %inline) they’ve kept it “small” :slight_smile:

i appreciate your kind views. you are always a gentleman felgall, but ie9 doesn’t exist yet :slight_smile:

still, we are talking about a big gun here, with quality control and all that. if it was a one man’s job and a one man’s web page, it would make some sense.

while it maybe right that someone else changed the DTD and didn’t complete the work, it’s no excuse. let me ask you this: you are a professional. will you accept such an excuse having such a mess in the code of your own page? even more so, having the topic “the browser we take pride with”. from a company selling software to help you create web pages.

more to the matter: forget about DTD. but they have two way of writing code in two consecutive lines: with self closing tags for empty elements, xhtml syntax, and with normal html syntax. i believe this says something right there. they seem to understand html5 in a wrong way: a place where your markup can go either way. another lesson for the future, and i believe we’ll be having this conversion many times in the following years.

i’m not trying to start a lashing party, i’m just trying to say this: “don’t follow someone’s lead just because they have a big name. judge the code without bias and see the mistakes. don’t repeat after them just because they can afford to be less careful”.

this is a good attitude i’m trying to inspire for someone new trying to learn: don’t be fooled by the name, dare to judge the code. big names also have to comply, or swallow their pride and take the criticism, right? companies and private persons included.

it’ll help us all :slight_smile:

That doctype is equally valid for HTML 2.

The head and body tags are optional in HTML - they are only required in XHTML.

Those search pages are required to work in all possible browsers (including ones written pre-HTML2. They also need to be as small as possible since they are the most accessed pages on the web - hence leaving out all optional tags.

HTML5 made anchors able to wrap blocks, so who knows?

The html and body tags are actually technically optional, but I’m not sure if a closing tag is optional if you’ve used the opening tag.

Still, no reason not to code to good practice… Google’s code has been complained about and picked apart all over these forums. We were pretty happy when they actually bothered to add a doctype a few years ago…

there is some truth in what you say, felgall.

i agree the small designer cares enough to make his life easier and is showing in his coding.

i’m not sure though, how a dev would keep his position in a big company doing a crappy coding job. unless there is no control, including quality control or how loosely this control is done. unless a temp or volunteer or practice. in which case his work is something that needs extra care.

if you do a crappy job and pass it to the next guy, i’m not sure you will always find a person willing to take it.

in a normal company there is usually an audit. there are also periodic evaluations. these have a goal: to verify the quality of your work. if you’re not doing your job well, they, if your boss/manager didn’t already, will fix it: asses and plan a strategy to improve. if they are not doing their job, or your boss/manager is not, and you get away with it, something is wrong and it will have its say sometimes.

IE9 does support XHTML so they could have use that if people using IE8 or earlier didn’t need to access the page.

XHTML does have the advantage that if your code isn’t well formed then it doesn’t display at all in any browser and so you must get all the basics of the markup right in order to be able to use it.

The person who wrote that page probably did use an XHTML doctype when they first wrote it and someone else came along later and changed the doctype without changing the code accordingly.

and so i provide the first bad example from a big gun.

ie’s big daddy: microsoft. some may say: an easy target. yes, it is, and this even after so many years they had to properly respond to all the critics and improve.

there is a big hype going around ie9: it will be the biggest, fastest, compliant… ok, ok, will see.

let’s look though, at the code for their browser’s presentation page. keep in mind they are also the proud providers of some rapid dev tools for web: web expression.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html dir="ltr" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/"> 
<head id="ctl00_ctl00_uxHead"><title> 
	Internet Explorer 8 Windows 7 Security Features Malware Privacy
</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /><meta name="keywords" content=" 
    internet explorer 8 in windows 7, internet explorer 8 security, internet explorer 8 privacy, internet explorer 8 malware protection, compare ie8
  " /><meta name="description" content="Find out what&#8217;s new with Internet Explorer 8 performance and security and privacy features that help protect against malware and other online threats." /> 
 
[...]

<meta /> 

hmm… let’s seee… they declare a html 4.01 strict. nice, we know they don’t support xhtml yet, so this is consistent…

but wait, xmlns: attributes for the html element? and are they using xhtml self closing tags for empty elements?

and what do i see down the page’s code:

<meta name="t_omni_rsids" content="mswindowsie8rc1" /> 
	<meta name="t_omni_events" content="event18"> 

are they mixing it up? well, this mixing of self closing with normal empty elements syntax belongs on the dance floor, not here. now i understand why they made an UA so permissive with author’s code: not for us, they need it first!

there may be other points to be made regarding their page, but with what we got so far, we can safely draw our conclusions.

so here it is:

  • don’t do what microsoft says, do what he says he’ll do :slight_smile:
  • don’t get your hopes to high, ie9 will probably mean more work, as usual :slight_smile:
  • follow other leads for correct coding examples. microsoft doesn’t care so much… yet!

The time has come to take a look at IE9’s home page: http://ie.microsoft.com/testdrive/.
There is definitely improvement.

But the HTML5 badge is not justified. The simple DTD is the only thing that suggests HTML5.
All the sectioning, all the rest is based on div. No specific HTML5 elements to speak off.

The mark up is XHTML style, though they failed to mention this fact in the mark up.
If this was IE8 home page, I would be impressed. When not looking at the semantics of the page’s mark up. :wink:

For IE9 seems a bit dated. It seems MS will still be a step or two behind the competition, whether is XP-/IE8 or Vista+/IE9 we talk about, still trying to make web devs life a bit challenging when it shouldn’t. And I’m not saying that just 'cause of the IE9 home page. :slight_smile:

Man I can’t wait to get ahold of a Win Vista or 7 box so I can see what all the fuss is about IE9 : )

[ot]
Though my boss has already seen one of the bugs: if I have a CSS gradient on a button with rounded corners, the gradient will leak out. A plain colour will not.

So now, do I remove the gradient from the (square) buttons for IE7 and 8 to appease 9? Or do I leave IE9 to be the weird one?[/ot]

You know, you can apply for a trial version for W7: Windows 7 Enterprise| Trial, Evaluation, Test, Deploy.

After that… I believe it will probably be one of those disappointing times. :slight_smile:

Off Topic:

And it has no CSS3 transforms support.

Off Topic:

This guy speaks better about the world of disappointment IE9 is about to bring to your comp:
IE9 & HTML5
http://people.mozilla.com/~prouget/ie9/ie9_vs_fx4.html

It may look a little bias. Take what you wish from it.
http://caniuse.com/#agents=ie,firefox&eras=now,near,far&cats=CSS

You can easily argue that a lead for firefox compairing FF4 to IE9 will make FF4 look better hands down.

Yeah, he’s not going to do the other way around, would he? Give IE9 credit over FF4! I said though you should take what you wish from it.

Despite this, FF4 is hands down better than IE9, looking at the HTML and CSS support. And not just by looking. There are still few valid tests, since both just became official releases, but from my limited testing so far, that’s the case. With or without considering HTML5 and CSS3.

Maybe IE9 has some features FF4 doesn’t have, outside those. But then again, IE9 is tied up, as always, in an OS. Its weakness. Not its strength.

IE9 says it opened the XHTML gates. I’m still curious. XHTML 1.0, and XHTML5. We’ll see.

And again, looking at the source code for the home page for IE9 (displaying the HTML5 badge), you’ll notice HTML5 is missing from it. That’s a statement in its self.

Well, it’s not like HTML5 has been finalized. That’s probably why Microsoft decided to include limited support for it in IE9. I won’t upgrade to IE 9 or FF4 for a while until I hear more from other users about them.

Since MS rolls out IE versions years apart, we can expect IE10 in about 2-3 years.
Including “limited support” for whatever HTML5 was finished, doesn’t seem like a good move, does it?

That said, as a home user, I always update to the latest versions. I even try some in beta. At work though, things are like you’ve opted.