You Are Here Home > Web Browsers

Web Browsers

To Validate Or Not To Validate Your Markup

To be honest, I personally think that as long as my pages work fine and look the same on all the major browsers, I’m fine. But for me, it is also very important to properly balance all my tags and try to keep the pages as close to be valid as possible.

But here is something interesting, these are screenshots of my attempt to validate some of the major Internet players such is Google, Facebook, Twitter etc.

(Click on the images to see them in full size)

(You can try this tool here: http://validator.w3.org/)

It doesn’t look like these guys care either but at the end, it’s up to you to decide if it’s worth it for you to validate your markup and write perfect HTML/XHTML/CSS…

To Validate Or Not To Validate Your Markup
Comments (3)   Filed under: CSS,HTML/XHTML,Web Browsers,Web Design,Web Development   Posted by: Hamid

document.getElementById On All Browsers – Cross browser getElementById

Here is a little JavaScript function that gets an object according to it’s id and it’s cross browser.

/*********************************************************************
   * Get an object, this function is cross browser
   * Usage:
   * var object = get_object(element_id);
   * @Author Hamid Alipour http://blog.code-head.com/
  **/
  function get_object(id) {
   var object = null;
   if (document.layers) {
    object = document.layers[id];
   } else if (document.all) {
    object = document.all[id];
   } else if (document.getElementById) {
    object = document.getElementById(id);
   }
   return object;
  }
  /*********************************************************************/
document.getElementById On All Browsers – Cross browser getElementById
Comments (4)   Filed under: JavaScript,Web Browsers,Web Development   Posted by: Hamid
« Newer PostsOlder Posts »