Centering this Button

Can you save me a lot of time? How do I modify this code to center it on the page?

<script src="https://givegab.s3.amazonaws.com/donation-widget/givegab-button.js" type="text/javascript"></script>
<p><button class="givegab-button" style="background-color: #228ae6;" data-campaign-id="204866" data-host="https://www.givegab.com" data-org-id="468678" data-preview>Donate Now</button></p>

Hello and welcome to freeCodeCamp.
When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

If the p element is full width (which it is by default) then you can center it using text-align: center or flexbox. It depends on the document structure and other styles applied.

<p style="text-align:center;"><button class="givegab-button" style="background-color: #228ae6;" data-campaign-id="204866" data-host="https://www.givegab.com" data-org-id="468678" data-preview>Donate Now</button></p>

Or

<p style="display:flex; justify-content: center;"><button class="givegab-button" style="background-color: #228ae6;" data-campaign-id="204866" data-host="https://www.givegab.com" data-org-id="468678" data-preview>Donate Now</button></p>

I’d suggest creating classes for the styles instead of using inline styles.