how can I make my HTML text <H1> and centered? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how can I make my HTML text <H1> and centered?

3rd May 2020, 11:16 PM
🌸Shyyoda🌸
🌸Shyyoda🌸 - avatar
5 Answers
+ 4
In HTML <h1>Forgive me Lord</h1> In CSS h1 { text-align: center; }
3rd May 2020, 11:27 PM
Ipang
+ 3
<center><h1> sentence </h1></center> do follow the html tutorial on sololearn
3rd May 2020, 11:25 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 2
<h1 style="text-align: center" >Text go here<h1/>
3rd May 2020, 11:32 PM
Marcus Xavierr
Marcus Xavierr - avatar
+ 1
Ok thank you I was looking for it but I could not find it, which one is it called?
3rd May 2020, 11:27 PM
🌸Shyyoda🌸
🌸Shyyoda🌸 - avatar
+ 1
Different ways to make <h1> text centered : ✓ Using text align attribute within h1 tag : Syntax : °°°°°°°° <h1 text align = "center"> Your Text </h1> (or) ✓ Using h1 tag within a center tag : Syntax : °°°°°°°°° <center><h1>Your Text</<h1></center> (or) ✓ Using text-align:; attribute in CSS file : Syntax : °°°°°°°°° HTML : ****** <h1>Your Text</h1> CSS : ***** h1 { text-align: center; } Thank You.. Eswar V © All Rights Reserved
4th May 2020, 1:47 AM
Eswar V