What do you want to attach it to?
Do you want a wood top attached to the legs or to cover the existing top? If covering top surface, just add screws from bottom. If just attaching legs to plywood then use screws that are shorter than the top thickness. 3/4" is probably the minimum thickness to ensure against sag. A solid wood trim around the plywood trim will add strength to the top and hide the plywood edges.
Is this what you mean? https://www.youtube.com/watch?v=85wIbNGNLVk