Why align="centre is not working inside heading tag[SLOVED] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why align="centre is not working inside heading tag[SLOVED]

17th Jun 2021, 6:24 AM
Learner
Learner - avatar
3 Answers
+ 3
To set the heading alignment in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <h1> to <h6> tag, with the CSS property text-align. HTML5 do not support the align attribute of the heading tag, so the CSS style is used to set alignment. By tutorialpoint NOTE : please post your code too
17th Jun 2021, 6:31 AM
Abhiyantā
Abhiyantā - avatar
+ 3
Center is the correct spelling in American English, but British English writers usually prefer centre . In HTML, if you write centre it won't work . You have to write center like American style. https://code.sololearn.com/W9a0a7A24A21 Similarly for color text in CSS, if you write color it will work but if you write colour it won't work.
17th Jun 2021, 6:49 AM
The future is now thanks to science
The future is now thanks to science - avatar
+ 2
thanks bro ,that's a very small mistake that people usually didn't give attention but it is very important.
17th Jun 2021, 6:52 AM
Learner
Learner - avatar