@Macchiato not sure if you are still around as you have not replied back to your thread
Spanking is rarely the solution to tantrums. I would leave that for far more serious issues like running out into the street.
Toddlers are still babies with little emotional control. Yes they can now walk and talk some and this makes them appear a lot older, but in reality they are still babies with more control over their bodies with a very basic understanding of what danger and no is.
-Make sure he gets enough sleep. A two year old may 'convince' you that he doesn't need a nap. But he doesn't know what he needs and yes he needs a nap. Even if he doesn't sleep, put him down for a nap and leave a few quiet toys.
-Make sure he gets plenty of healthy food. Again he may 'convince' you that he won't eat healthy but he can, just offer a range of healthy options. Same goes for water, offer water over juice. Keep sugar low. Sugar highs will cause melt downs.
-Plenty of physical play. Toddlers have a ton of energy and not wanting to nap can come from them not getting enough physical activity.
-Make sure rules and kept very short, don't have lengthy talks with 1 and 2 year olds.
-If you can say yes, then say yes
-If you must say no keep your no to no and be ready to pick him up and carry through. Don't plead or bargain.
-Try and make things fun. You really need to take your time with toddlers.
Play games with getting dressed and let him try things himself and don't be in a rush. Kids pick up on rush tension. So if you try and rush and dress him this will likely make him difficult. Say rhymes while doing things -don't know any? Grab a book and learn some. If you say and do the hand motions he may get distracted and try and do it too. Distraction can work wonders with toddlers.
-Don't offer a choice unless a choice is to be had. Saying things like "Do you want to get in the car/ have lunch/sit on the potty?" Invites a "No!" Just say 5 more minutes, 2 more minute, time to X. This will help him learn time concepts. If you have two cups he can use then this is the time to ask a question about which one he wants. When what he chooses doesn't matter. Toddlers really don't want to be in control, that is scary for them, they need you to be in control and for choices to be safe and easy.
If the temper tantrum is from frustration see if you can change the environment. Sometimes a firm cuddle will help.
If it comes from you saying no, or time to do X try and ignore it.
If you waiver and give in this will cause more tantrums. So if he had a lolly (candy) one time he may expect it next time. If you say no when he points to the lolly stand and he screams and you then switch to yes because its embarrassing having him scream, you have then taught him to scream to get his own way. You need to gently teach him that screaming is not how we get what we want and you do that by not giving in and keeping your own temper under control. Always amazes me the number of adults who scream while telling the toddler not to scream. You are the role model.