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>

Free Live Chat for Any Issue

Multiple blocks of text

p {

responsive header

Also Read This πŸ‘‰   Free PHP, HTML, CSS, JavaScript editor - Codelobster IDE

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.