Getting things right vs. Getting things done

Most of today’s web developer will tell you that

the following:

<h2 id="foo">Click Here</h2>
<script>
    $('foo').click = function(){alert("Hello")};
</script>

is better than:

<h2 id="foo" onclick="alert('Hello');">Click Here</h2>

and the following:

<style>
body{
    background-color:#ffffff;
    color:#000000;
    margin-top:3}
a{color:#0000cc}
a:visited{color:#551a8b}
</style>
<body>....</body>

<script>
$(document).ready(function(){
    sf();
    if(document.images){
        new Image().src='/images/nav_logo3.png';
    });
</script>

is far better than:

<body bgcolor=#ffffff
text=#000000
link=#0000cc
vlink=#551a8b
alink=#ff0000
onload="sf();if(document.images){new Image().src='/images/nav_logo3.png'}"
topmargin=3 marginheight=3>....</body>

and last but not least: Using HTML tables for layout-ing is evil.

The point is that the code above is taken from Google, Facebook and Yahoo.
Yep! All the majors seems to be caring less on standards and more for their own interests.

None of them are valid HTML and Google.com uses a table to align the two buttons (Google Search and I’m felling Lucky) in the middle of the page.

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s