answersLogoWhite

0

The CENTER tag in HTML is used to center blocks of code within an HTML document. The tag is very easy to use as you only have to open it and close it around the text you want centered. This can be 2 lines of text or an entire webpage. See the example below.

<center> Smasher is teaching me HTML </center>

This would take the text and center it on the screen. If you want to center the whole page simply put the open tag at the beginning of the document and the close tag at the end.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
ReneRene
Change my mind. I dare you.
Chat with Rene
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
More answers

You can add the align=center attribute to your heading tag.

Example:

Welcome!

User Avatar

Wiki User

11y ago
User Avatar

Add your answer:

Earn +20 pts
Q: What is the code to center a heading in HTML?
Write your answer...
Submit
Still have questions?
magnify glass
imp