Question:

What's the center HTML tag?

by  |  earlier

0 LIKES UnLike

I need to center <h1>example</h1>, but what's the tag to center it?

 Tags:

   Report

6 ANSWERS


  1. The center tags have been deprecated.  To do it according to HTML 4.01 Standards:

    &lt;h1 style=&quot;text-align: center;&quot;&gt;This Heading is centered!&lt;/h1&gt;

    If you want all &lt;h1&gt; tags center, then use external or embeded CSS with this:

    h1 { text-align: center; }

    Ron


  2. In your head element, paste this CSS:

    &lt;style type=&quot;text/css&quot;&gt;

    &lt;!--

    h1 {

    text-align: center;

    font: bold 15px Helvetica, Arial, sans-serif;

    }

    --&gt;

    &lt;/style&gt;

    And it&#039;ll change your H1 elements.

  3. It&#039;s been awhile since I&#039;ve used HTML, but try &lt;center&gt;stuff&lt;/center&gt;

  4. Simply but this before everything you want centered  &lt;center&gt;  and then close it with this &lt;/center&gt;


  5. &lt;center&gt;This?&lt;/center&gt;

  6. &lt;center&gt;stuff&lt;/center&gt;

Question Stats

Latest activity: earlier.
This question has 6 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.