how to make h1 tag in center code example
Example 1: 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>
Example 2: html move h1 to center
div{
height: 400px;
width: 800px;
background: red;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
}