Ask coding questions

← Back to all posts
How can I center my <H1> elements
TriciaKennedy

Trying to center h1 element tag

Voters
MinjinKim
azharuln
JerusalenZarate
woo0002
ZynalRustam
DanielRodrigu22
Logimite
timmy_i_chen
Comments
hotnewtop
timmy_i_chen

Have you looked into using text-align: center; in your CSS yet?

roboticmind
<center></center> should also work depending on how you have it set up
TriciaKennedy

ok I got it centered but I am trying to center a img [email protected]

Yamboy1

@TriciaKennedy You could use the following css

Heres an example repl: https://repl.it/@Yamboy1/WellmadeOnerlookedSites

TriciaKennedy