Slices divide an image into smaller images that are reassembled on a web page using an HTML table or CSS layers. By dividing the image:
You export and optimize a sliced image using the Save For Web& Devices command:
Slices created with the Slice tool are called user slices. user slices are defined by a solid line
slices created from a layer are called layer-based slices. layer-based slices are defined by a solid line
You can use the slice tool to draw slice lines directly on an image, or design your graphic using layers, and then create slices based on the layers.
Layer-based slices are less flexible than user slices; however, you can convert (“promote”) a layer-based slice to a user slice. See Convert auto and layer-based slices to user slices.
A layer-based slice is tied to the pixel content of a layer, so the only way to move, combine, divide, resize, and align it is to edit the layer—unless you convert it to a user slice.
All auto slices in an image are linked and share the same optimization settings. If you want to set different optimization settings for an auto slice, you need to promote it to a user slice.