Web designers work a lot on Photoshop. Very few of them know how to code and take the steps to convert their designs into CSS/HTML/XHTML. So they normally outsource their coding part and keep themselves intact with designing only. For those who are not familiar with the “the know how” of HTML coding, this article can be a little help for them.
It is not hard to convert your design into validate CSS/HTML/XHTML markup, but what makes the difference is how well you are able to do it! Because at last, it is the “quality” of your coding which brings out the performance of the web page, and the reason for which any designers outsource their coding part to some professional. Ex: – If your web page contains many pictures, it would take time to load, but using CSS code with either HTML or XHTML will make it fast.
There are many tutorials one could find over the Internet but to understand those prototypes, you need to have the basic knowledge of coding. I would try to answer the question “How to convert a PSD into validate CSS/HTML/XHTML”, but for that you need to focus and spare sometime to this article.
Steps included in conversion:-
1) Open your Photoshop and select an existing PSD file which is to be sliced, from the file menu of the Photoshop application’s main menu.
2) Once the PSD file is selected, go back to the file menu and select Edit in Image Ready option from the list. It will open the file in Image Ready.
3) Now select slice tool from tools palette which can be either on right or left hand side, vertically. This tool will help us to slice the document the way we want. Ex: – you can pick and slice the document to get the header, menu pictures etc., properly.
4) Once you are through with the slicing, you will notice those sliced area (areas) sinking into blue color. This indicates “slicing”.
Imp:- Never slice an image twice as it will only increase your burden.
5) The next important step is to define the output parameter. This will convert the slices into pictures along with coding.
6) Define output parameters to start the process: -
a. Click the file menu, open output settings, and choose the CSS export link.
b. An output setting box will appear on screen, along with many options.
c. Now, select the custom option within output setting, you will get two options- slice output and generate (CSS) ( generate html which uses CSS to represent slices).
d. Click ‘ok’ after defining output options. You have validated the settings but the file is yet to be created.
e. Now, this is the final step. Save the result using “save optimized”, inside the file menu.
f. The job is done; image ready will create an “image” folder with all sliced images and html file containing all source codes.
g. If you wish to see or edit the code, just open the file in your browser and display the code. Extract the code generated by Photoshop or image ready.
h. You are done now, your codes are with you but you might need to modify them with your own and nip some part of it.
Now if you think that you got it right and this article delivered you some valuable knowledge on slicing and HTML conversion, then you can surely dissect your web design and experiment it on a web site. But if you have even a minuscule doubt, then don’t play with your web site’s design and let the coding be done by some professionals.
Xhtml.pixelcrayons.com converts your design files from various common image formats (PSD, JPG, GIF, PNG, AI) into best quality cross-browser compatible W3C validated XHTML/CSS markup. Check xhtml.pixelcrayons for our PSD to XHTML Conversion and PSD slicing services.