HTML | PHP | Forum

HTML <center> tag


<center> - </center>

Definition and Usage

The CENTER element defines a block whose contents are centered horizontally on visual browsers. <CENTER> is a shorthand for <DIV ALIGN=center>. Both methods of centering are deprecated in favor of style sheets.

CENTER is still useful for centering tables since many browsers lack support for <TABLE ALIGN=center> as well as the method of centering tables with Cascading Style Sheets

Standard Attributes

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.

Event Attributes

onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.


Source Output
This is a sample text
This is a sample text


Learn HTML
HTML Tutorial

HTML Reference
HTML by function
HTML by Alphabet

HTML events
HTML attributes
HTML color names

<h1> to <h6>


Copyright 2005-8 Sunilcare.  All Rights Reserved.
Comments or suggestions? Contact us.About us