How to centre a HTML search bar

So I’ve been trying to make my search bar align to the centre of the page, not the left. How do I do this?

Current code:

<input type = "text" placeholder = "Search...">

Welcome to the forums @theindianpianist!!
I believe you will need more than HTML for that.
If you know CSS using the text-align code should work.

If you don’t I recommend looking into CSS, It is used for detailed styling of HTML pages.

With the help of CSS, you can center inline elements horizontally with just:

element {
  display: block;
  margin: 0 auto;
1 Like