Center Tag in HTML | HTML Tags | Use of Center Tag
×

HTML CENTER (<center>) Tag

0 1097

The <center> tag is a block-level element consists of both block-level as well as inline content inside it.

The <center> tag is used to center-align contents such as text, graphic elements, tables, etc. The content written between the <center> tag will be displayed at the central of the page.

You can also use CSS property i.e. text-align: center; to center-align content.

The <center> tag is not supported in HTML5.

Syntax:

where, contents are written between the start and end tag.

Code:

<!DOCTYPE HTML>
<html>
<head>
   <title> The Center Tag </title>
 </head>
 <body>
   <h2> Example of Center Tag </h2>
   <center> This content is displayed in the middle of page,
   but You can use CSS property to align the content. </center>
   <p><b>Notes:</b> The center tag is not supported in HTML5. </p>
  </body>
</html>

Output:

HTML CENTER (<center>) Tag



Share:


Leave a Reply


Comments
    Waiting for your comments