The placeholder attribute is meant to give the user a nonessential hint before filling in a form field, not replace the label element.
If you’re using width:100% to undo a previously set width on a block level element, you should probably be using width:auto instead. Here’s why.
Browsers give visited and unvisited links different colours by default for a reason. Make sure you have a really good reason to make them look identical.
Since screen readers run alongside regular web browsers and have no user agent string of their own, there is no reliable way of detecting them.
Unless you have really strong internationalisation requirements, consider sticking to the following characters in URLs: a-z, A-Z, 0-9, -, ., _, and ~.
Two types of mistakes that I see every now and then are using end tags on void elements and using self-closing start tags on elements that can have content.
Neglecting to style :focus when you style the :hover pseudo-class can lead to minor inconvenience at best and complete inaccessibility at worst for non-mouse users.
Using the “Web Page, complete” (or similarly named) option when saving a page with a web browser will often change the markup.
When creating data tables in HTML, make sure to mark up the table structure properly, using the relevant elements and attributes available in HTML.
When grouping the options of a select element, you can use the optgroup element with a label attribute instead of faking the groups with option elements.
When you add skip links to a site, do not hide them completely from sighted users.
Think carefully before adding a reset button to a form. Is being able to reset the form so valuable that it is worth the risk of losing the data you have entered? Probably not.
To help users of non-visual browsers understand data tables, use the table element’s summary attribute to describe the tables’ structure, especially for complex tables.
Remember that many people do not use a mouse to interact with the web, so you have to make sure that the sites or applications you build work independent of input device.
There is no way to specify alternate text for CSS background images. This is not a problem since background images should be used for presentational purposes only.
Only use the fieldset and legend elements to group logically related form controls, always use both elements together, and keep legend texts short.
If you use an XHTML doctype with an XML declaration, Internet Explorer 6 will switch to Quirks mode and use an incorrect CSS box model.
Always make sure that any links you create have actual text content, or they will be unusable to some of your visitors.
Page navigationPage 1 | Page 2
Subscribe / follow
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost