<center> : Centered Text element

Introduction


The ‘<center>‘ element was used in older versions of HTML to define a block of content that should be centered horizontally within its containing element. It was typically used to center-align text or other inline or block-level elements.

However, the ‘<center>‘ element has been deprecated in HTML5, and its usage is discouraged. Modern web development encourages the use of CSS for styling and layout purposes.

Here is an example :

Output :

But today we use CSS for centering the text.

Leave a Comment