Hello guys, I'm managing the development of a website (new job) and we are currently on the slicing phase of the template, and I hear a lot of things of what we should and should not do while slicing... so what are the good practices you experienced developers do?

  • What formats should the images be?
  • Html conformation level (strict, transitional etc)
  • what tags should and should not be used
  • etc etc...


1 answer

danwellman 5600

With images the format depends on the type of image - photo's should amost always be JPG, anything with alpha-trasparency (things with fading drop-shadows, outer glows, etc) should be PNG. Others can be GIF. A good rule of thuimb is to go with what is the smallest filesize that still retains the desired quality. PNGs (and GIF) can also be compressed too whereas JPG cannot. Don't forget to use sprites wherever possible to minimise HTTP requests.

HTML should be 4.01 Strict or XHTML 1.1 strict. Transitional was invented to help developers transition from earlier versions of HTML to the latest standard. The period of transition should have ended years ago ;)

Or you could use the HTML5 doctype which is backwards compatible and easier to remember...

Don't use any presentational tags like <b> or <i>, or anything else that is deprecated. You'll need to run the code through a validator to check the tags you're using are valid...

Answered almost 9 years ago by danwellman
  • you should only use XHTML1.1 Strict if you're serving it as XML, if you're not, but still want the XHTML syntax, then choose XHTML 1.0 http://www.w3.org/International/articles/serving-xhtml/ Tony Crockford almost 9 years ago
  • Good point, I tend to use HTML 4.01 wherever possible anyway danwellman almost 9 years ago