Posts Tagged ‘HTML center tag replacement’

HTML center tag


Description:

The HTML center tag is used to center-align HTML elements.

The <center> tag is not supported in HTML5. Use CSS instead.

The <center> element is deprecated in HTML 4.01 and XHTML.

Tip: Use CSS to center text! In our CSS tutorial you can find more details about centering text.

Example:

Code View
<center>This text is centered</center>

This text is centered

Standard Attributes:

Attribute Description
class Document wide identifier
dir Specifies the direction of the text
id Document wide identifier
title Specifies a title to associate with the element.
style Helps to include inline casecadubf style sheet.
lang Sets the language code.

Event Attributes:

Attribute Description
onclick Script runs when a mouse click
ondblclick Script runs when a mouse double-click
onmousedown Script runs when mouse button is pressed
onmouseup Script runs when mouse button is released
onmouseover Script runs when mouse pointer moves over an element
onmousemove Script runs when mouse pointer moves
onmouseout Script runs when mouse pointer moves out of an element
onkeypress Script runs when key is pressed and released
onkeydown Script runs when key is pressed
onkeyup Script runs when key is released
Designed for Mytoptutorials.com