1. Open illustrator.
2. Import your clipart on the stage.
3. Go to Windows and open Layers (F7).
4. The layers table will appear towards the right. Click on the arrow icon of first Layer 1.
5. All the layers of the image will get listed out. Make sure:
- No group exists among layers, If they do, ungroup them (Shift+Ctrl+G)
- Number of layers should be limited to number of colors
Select layers of the same color. To do that, first select a layer and go to Select>>Same>>Fill Color
6. All color layers with same color will get selected, Now, merge them. To do that, go to Object>>Compound>>Make (Ctrl+8)
7. Repeat the same steps for all the layer with a same color. In case you see a path in the Layers Table, convert them to compound path (Ctrl+8).
- Make sure there are no groups, path layer, text layer, and outline
8. Select all the layers and form a group (Ctrl+G)
9. Save the file as '.svg'.
Make sure the CSS properties are set to 'presentation attributes'