How do you insert code into the sidebar?

I would like to add code to the top of the sidebar.

When I do:

It adds above the sidebar DIV. I would like to insert inside the DIV.

If I do:

It goes in between every single widget and inside all widget areas.

I just want to add some code above all widgets in the right or left sidebar.

Thank you.