Answers for "how to center a h1"

0

center h1 css

h1 {
    width:500px;
    margin: 0 auto;
    background: gray;
    text-align: center;
}
Posted by: Guest on May-09-2020
2

how to center an h1 in html

<style>
h1 {
  text-align: center;
}

h2 {
  text-align: left;
}

h3 {
  text-align: right;
}
</style>
/* or you can do inlne
<h1 align="center">Example</h1>
Posted by: Guest on December-20-2020

Browse Popular Code Answers by Language