Corverting My PSD to HTML

Software I use for slicing
1.Photoshop (indispensable): You can use Fireworks instead but there’s a chance it could misinterpret the PSD and the colors and shapes might go haywire.
2.Text editor (indispensable): I use Microsoft Expression Web which is solid boost to my productivity.

Knowledge needed for PSD to HTML slicing
1.Full-fledged knowledge of XHTML: You must know all the tags XHTML 1.0 offers and the minor semantics of everyone of them under all circumstances.
2.Full-fledged knowledge of CSS: You should know all possible styling rules for each and every of the HTML tags. In addition, you know how to stack selectors in ways that not only benefit you but also good for your users who are very likely going to modify your code at real implementation. You must also have a very well organized set of CSS tricks / tips / hacks for coding every problem out – be it cross browser techniques, browser specific problems and many many others.

These can be learned by practicing for years and learning from mistakes and trials, but you can also submerge yourself in all the things Google could offer you. Search for a solution.
3.It takes sweat and toil to attain XHTML / CSS superpowers which may very well takes years in time. Be persistent and keep learning as well as practicing.

What makes a good conversion?
1.Valid W3C XHTML code
2.Valid W3C CSS code
3.Well indented and commented code
4.Good sense of semantics through the use of tags
5.Good balance of code simplicity and readability
6.Well constructed code / style structure in regards to future tweak and further development
7.Atomicity / modularization of styles
For more practical examples of excellent PSD to HTML conversions, read them here and here.

General guidelines
1.Not to mention, the converted result should be as pixelly precise as possible against the original design. Though not a doctrine it is for example, sometimes the designer may have rushed and you will spot a few design inconsistency in which case, you will make it consistent instead of following the PSD blindly.
2.Font sizes should be in ’em’ or relative sizes, most of the time, so users could resize them easily from their browsers – not required though because browsers are getting smarter and smarter. Many modern browsers can resize texts in absolute font sizes. Another scenario in which you may want to use absolute values such as ‘px’ is when you are modularizing the styles such as delivering just a section / part of an entire page for the client to integrate into other pages. In this case, using absolute font sizes would reduce incompatibility and prevent font sizes from being affected that those of the native ones.

3.All designs, unless otherwise specified should be centered as a result of expanding screen resolutions.
4.All backgrounds, including header’s, body’s and footer’s should expand as wide as the screen and blend well with the content.
5.Flexible layouts or vertically expandable content boxes – this could be a primary cost for designs having way many rounded corners and background gradients.

6.Well decomposed page elements so clients can change things easily.

7.Let me add more when I can think of them. Or pay a visit to my blog I’ll keep updating on the front end tips concerning effective use of XHTML, CSS and JavaScript for SEO, accessibility and usability.

Rough methodology and procedures

1.Lay the foundations first – sectioning, or how you are going to divide up the pages. A general rule of thumb is to think in terms of backgrounds. Is the design very complex with various stacking backgrounds in crazily changing colors in all directions. Is it vertical? Or is it horizontal? How you are gonna repeat that and expand horizontally / vertically to the end of the screen.
I have done hundreds of conversions up until now and most of the designs can be divided into header, content, sidebar (maybe more than 1) and a footer. Each of them may have the potential to contain another

for the sake of complex backgrounds or simply rounded-corner content boxes – to ensure they expand / shrinks vertically as content grows.

2.Scour all PSD pages if there’s more than one. Especially when there’re many of them, you should definitely do this. With a rather complicated design you should find many repeating visual elements such as sidebar widgets, content area headings and special floating image boxes. With a slight tendency of style modularization, you are on a good way of reducing your conversion time and bringing up productivity.
3.Sometimes it’s not obvious with repeating patterns but you can still save a lot of trouble by well sticking to the cascading of CSS. For instance, with a complex undertaking, you will have a lot of a:link, a:visited to deal with, but you should first examine what styles are shared among them and lay the ground work first. Later on whenever you meet a slightly more specific situation e.g. with #header a:visited, #header a:link, reset the default values you have set before.
4.So now you have found all the common page parts and made dozens of code snippets that you can move around freely, maintaining their original style. It’s good and you will soon learn to do more with it and love yourself in producing faster than ever. Let’s get down to the minor details, mostly inline elements. Don’t forget to make general classes for wide-spreading usage of common notices, errors and emphases.
5.After completing the initial draft of your conversion, now you need to compare if the pages coded by you reflect the original designs like in a mirror. Fire up your browsers: IE6(getting ancient), IE7, IE8, FF2, FF3, Opera 9.5 and Safari Win – more luxurily, a Mac OS Safari, and test those babies out. Spot minor erros and fix ’em, making them all consistent in look.
6.Validate your XHTML code at and CSS at
7.Actually there are more geeky tests such as accessibility, usability, image on and off and much more than just these but we will just leave them here. You must be already scratching your head for a simpler guide


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s