CENTER (<center>) Tag

by Jai 10-Jun-19

0 328


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:
<center> </center>  where, contents is written between 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:

CENTER (<center>) Tag


Share:


Comments

    Waiting for your comments

Leave a Reply