Is 1/2 inch hardboard more durable than mdf for a table top?
ANYTHING is better than MDF for your project as it is a terrible material for furniture, especially custom made furniture.  Also you can't use a router on MDF - well you can but it will not turn out well.
So you can probably find pine, oak and cedar at big box.   All stronger than mdf, all suitable.   If you are painting, pine is my go to as you can cover it without seeing the grains.  (there are many many other choices of solid wood planks if you want to order or go to lumber yard.  I just answered the question in a wood that is reasonably easy to find.)