There are some tools that can do that, such as Dreamweaver which Melvin mentioned. However in Photoshop there isn't really much to help with the actual coding side of it. Search for some tutorials about "slicing" a design, they should help you with what you are looking for.