DOCTYPE's and Web 2.0

Arrrgg!!! Why is this such a problem? I see way to often in websites that I visit, an improper DOCTYPE statement in the website/pages. When I visit a website and see something that I like in regards to a style, JavaScript, layout, or an aspect of that page that's not related to the content(content is just reading material). I will view the source code to see how it was accomplished. More often than not the page looks good but follows no Web 2.0 standards or compliance at all.

The first mistake I will see is the doctype statement which will look like this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transistional//EN">

This declaration has no meaning and absolutely no purpose. I might as well start creating my own HTML tags in my documents if this is how to do things.

    <div class="content">
        <circle>Round things</circle>
          <hamburger>A hamburger is sometimes a circle.</hamburger>
          <puck>A hockey puck is a circle.</puck>
          <friends>A circle of friends.</friends>
    </div>

Using a document type properly is a way of following a form and a standard for Web 2.0 compliance. The proper way of declaring a DOCTYPE in your web pages is by referencing a .dtd(document type definition) like this.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transistional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

This declaration is actually calling a cross-browser and standards based Web 2.0 infrastructure of style, layout, and functionality.

The 2nd thing I will notice is the use of HTML Tables. Ouch!!
Why use tables when you have Style sheets? CSS is and was designed as an aid to separate presentation and content. So why are tables being used for presentation?

    <table width="200" bgcolor="#000000" height="200">
       <tr>
       <td align="center">

          This table is ridiculous to write when you can write the same thing as this using CSS and a div.

             <div class="table">
                Replace your tables with CSS!!!
             </div>

       </td>
       </tr>
    </table>
            
Of course your going to have to know and/or learn a bit of CSS to control the class=table.

    .table {
       background:#000000;
       width:200px;
       height:200px;
    }
 
With following Web 2.0 standards and a proper DOCTYPE declaration you will have Valid and Compliant Websites/pages. The use of tables as shown above will never work with W3C Compliance web standards or in the ever so changing WWW.

As the world and the web changes and moves forward. So should you as a Web Developer. I would not have my career as a Web Application Developer, if I did not follow and adapt to the changes and abilities that the Internet has grabbed a hold on and embraced.

| | Comments (0) | TrackBacks (0)

Leave a comment

BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda,bmw bmw bmw Acura, Honda, Acura Forerunner, SUV, BMW, Mercedes, Toyota  
Volvo, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan, Honda,Volvo Volvo Volvo Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota
Volvo, Toyota, Volvo, Saab, Audi, Nissan Mercedes, Volvo, Nissan, Honda,Volvo Volvo Volvo Acura, Honda, Acura Forerunner, SUV, Volvo, Mercedes, Toyota


Chicago Blackhawks
Chicago Blackhawks
Stanley Cup
Stanley Cup
Pittsburgh Penguins
Pittsburgh Penguins
Boston Bruins
Boston Bruins
Fire & Flames
Fire & Flames








 


Categories

BMW, Toyota, BMW, Saab, Audi, Nissan Mercedes, BMW, Nissan, Honda, Acura, Honda, Acura Forerunner,bmw bmw bmw SUV, BMW, Mercedes, Toyota