HTML <center> tag
The <center> tag is used to center content within its containing element.
NOTE: If some content you try to center is not within a containing element, then it's containing element will automatically be the webpage itself in which case the content will be centered on the page.
NOTE: This tag is deprecated.
Standard attributes
class, dir, id, lang, style, title
For more information on standard attributes, check out our HTML standard attributes reference page.
Event attributes
onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup
For more information on event attributes, check out our HTML event attributes reference page.
Example
The image in this div element will be centered
Tips & notes
The <center> tag is deprecated. CSS should be used instead.
Don't get overexcited about the whole centering concept. You should center content only when you really need to like to place emphasis on some text or an image or to center the entire content container of a webpage as part of the style of a website. Centering should be practiced carefully and efficiently.