Finely shred the cabbage and carrot.
Place the shredded onion together with the cabbage and carrot in a large bowl.
Add sugar, vinegar, mayonnaise, lemon juice, and salt, and mix well.
Let it chill in the refrigerator for at least 30 minutes.
Serve the finished coleslaw on a plate.