some image

Scribes, Tests & More...

Web Development Best Practices

1/28/2014 (PST)

CSS Reset

In the common CSS file that is first loaded by your site, include a CSS reset. Browsers use different default styling for padding, borders, and margins for every element. Applying a CSS reset ensures that every element starts at the same developer initialized, (that's you) known value, greatly reducing cross-browser issues.

Resize Your Images

Use an image resizing tool to properly resize your images to the actual size as set in the CSS or ugh! html img image tag. Page performance will greatly increase and your images will actually look better.

Use CSS Stylesheet Pages

Your page should not be cluttered with inline styles because: The inline style takes precedence over every other style and you lose control of the ease of changing the stylesheet definition to affect all elements. Devices viewing the page are also stuck using the inline style.  Avoid page level CSS as well, because you circumvent your CSS stylesheet page.

Comment Your Code and Closing Tags

Comment your CSS classes, your HTML closing div tags and CSS selector commands if they are intended to target different browsers.

Load Javascript Files Last

In general, most scripts interact with the DOM, which is not ready until the page is completely loaded.  Placing your javascript file references at the bottom of the page ensures the page is ready before any script interaction can take place.



blog comments powered by Disqus