Using sprites with IMG tag?

Using sprites doesn’t necessarily mean you need to define them in css backgrounds. You can also use IMG tag sprites, to do so you need basically trim your image. There are two good articles explaining that technique: http://tjkdesign.com/articles/how-to_use_sprites_with_my_Image_Replacement_technique.asp http://www.artzstudio.com/2010/04/img-sprites-high-contrast/ Both CSS and IMG methods sure have their own benefits, so you need to figure out … Read more

What’s a valid HTML5 document?

The title element is indeed required, but as Jukka Korpela notes, it also must be non-empty. Furthermore, the content model of the title element is: Text that is not inter-element whitespace. Therefore, having just a space character in the title element is not considered valid HTML. You can check this in W3C validator. So, an … Read more

w3c html validation error – Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections

Either: Add a heading (h1, …, h6) tag to your section element. Replace your section element with a div element. Ignore the warning. The message you’re seeing is a non-normative usage recommendation, as per the HTML5 spec (highlighting mine): The theme of each section should be identified, typically by including a heading (h1–h6 element) as … Read more

How to Call a JS function using OnClick event [duplicate]

You are attempting to attach an event listener function before the element is loaded. Place fun() inside an onload event listener function. Call f1() within this function, as the onclick attribute will be ignored. function f1() { alert(“f1 called”); //form validation that recalls the page showing with supplied inputs. } window.onload = function() { document.getElementById(“Save”).onclick … Read more