Creating a div for a formatted quote paragraph

The plan here is to replace the relatively simple p class=q by a div that has a background in a different colour that contains the text in the original class

"The original quote"

The div

This is the text.

I need to add padding or margins (see, I still don't know the difference)

The code

The target div has the id="quote".

The original paragraph text is class "q"

I need a function to get the original text

A function to create a new div with the background colour and formatting that I require and then set its contents to the original quote text. While hiding the original quote paragraph.

Links

formatted quote paragraph