Make a slanted headboard
Click on the image to open

What’s the best way to make this headboard? It has a way to pass a cable for providing a socket to charges phones at night, and it has a small tablet on the top for putting things. My question is mainly on how to join two pieces of wood and how that can sustain the weight of the tablet.