Combine mayonnaise, vinegar, white sugar, celery seed, onion, salt, and black pepper. Add cabbage and carrot to mixture. Using a pair of tongs, toss vegetables in dressing to coat well. Cover bowl with plastic wrap and place into the refrigerator for at least 30 minutes to 1 hour before serving. You can prepare the coleslaw 2-3 hours ahead of time.