HTML/Elements/center

From Web Education Community Group
< HTML‎ | Elements
Jump to: navigation, search

<center>

HTML Reference

The <center> element was introduced in HTML 3.2 - Block elements. It has been deprecated since HTML 4 - 15.1.2 Alignment.

HTML5 classifies it as a non-conforming feature.

Examples

No, really, don't use it.

Alternative

<div  style='margin-right: auto; margin-left: auto;text-align: center'>
<video controls>
 <source src="http://media.w3.org/2010/05/sintel/trailer.mp4"
         type='video/mp4; codecs="avc1, mp4a"'>
 <source src="http://media.w3.org/2010/05/sintel/trailer.ogv"
         type='video/ogg; codecs="theora, vorbis"'>
 <p>Your user agent does not support the HTML5 Video element.</p>
</video>

<p>This paragraph is in the center.</p>
</div>