This is for a 2002 Elantra GLS but the procedures should be similar for other model years.
My valve cover gasket has started to leak and with 107k miles on the car I figured it didn't hurt to replace it and keep things looking the least filthy as possible.
10 mm deep socket
14 mm deep socket
Mallet and block of wood
Clean shop rags
Clean place to work
Flat bladed screw driver
**Before disconnecting battery, if you have an anti-theft radio make sure you have the code for it!
**Make sure the engine is completely cool before this procedure.
1. Disconnect Battery
2. Remove accelerator cable from the back edge of the valve cover.
3. Loosen the bolts and remove the spark plug cover.
4. Using pliers loosen the hose clamps for the breather hose and PCV hose located on the back side of the valve cover and next to the right accelerator cable mount.
5. Slide both hoses off the outlet stems and let hang.
6. Remove the 4 bolts holding on the top timing belt cover and the cover too.
7. Remove the 13 bolts for the valve cover.
8. Using a sharpie, mark the spark plug wire assignment for each wire and pull out the wires and place them to the side of the engine.
9. Pull off the valve cover. Make sure you've loosened and removed all bolts first. If the valve cover is stuck, take a mallet and a block of wood and hit the sides of the cover to get it loose. It's also a good idea to keep the exposed engine covered if the car is outside while you work on it.
10. With the cover placed on the workbench, carefully remove any debris on the cover mating surface. Be absolutely sure not to scratch the metal surface and not get any debris into the engine. When the debris has been cleaned off, wipe the surface down with acetone so it's oil free. The reason is because any residue could cause an improper seal and oil leak. In the picture note the residue on the mating surface after I removed the cover. I cleaned it all the way around not just where the lines are. Also clean the mating surface of the cover itself once the gasket has been removed. I'm not sure if acetone on the plastic cover is safe since some plastics are reactive to acetone.
11. There are several items to replace on the valve cover. The gasket runs along the outside and all the way around. There are also 4 seals. You can also see the PCV valve and breather outlet more clearly. The PCV valve will also be replaced.
12. To remove the spark plug seals, take a flat bladed screw driver and mallet and place the valve cover on your work surface, on a cloth and tap out each one by placing the driver blade along the edge marked here. There is a metal band inside each seal so they cannot be pulled out.
13. Pull out the cover gasket and replace with the new one.
14. Remove the sponge from around the PCV valve.
15. Using a 14mm deep socket, remove the PCV valve and replace with the new one. Put the sponge back over the new valve.
**NOTE** My PCV valve has never been replaced with 107k miles on the car. It may not have needed it yet but it's a $5 part and since the cover was going to be off it was one of those things I thought is just common sense to do.
16. Place the rebuilt valve cover over the engine and reassemble in the opposite order everything was removed. When tightening the valve cover bolts, start in the middle of the cover and loosen gradually in a cross-cross pattern outward. Tightening torque is between 72 - 84 inch-pounds or 6 - 7 ft.-lb.