how to center a heading in html?

how to center a heading in html Using the <center></center> tags and Using a style sheet property Example with demo.

<center>Center this text!</center>

how to center a heading in html

How to set Heading alignment in HTML?


<!DOCTYPE html>
      <title>HTML Document -</title>

      <h1 style="text-align:center">Tutorial</h1>
      <p>Learn for free</p>

How to center text in HTML


<p style="text-align:center">Welcome To</p>

Multiple blocks of text

p {

responsive header

using class

.center {
 text-align: center

<p class="center">Welcome To</p>

I hope you get an idea about how to center a heading in html?.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Also Read This 👉   remove underline from link css using text-decoration Best 5 Examples