These sawhorse desk plans, which are available for a variety of skill levels, offer both.
(Or if you like the industrial look of the brackets.)
It requires a bit more cutting, assembly, andmy favoritetools, than the last plan.
You could modify the dimensions on these plans to suit almost any space.
Title photo fromShanty 2 Chic.