Wednesday, January 23, 2013

Element (center) is obsolete. Its use is discouraged in HTML5 documents


In latest version of HTML (HTML 5.0), CENTER tag is deprecated. So instead of using Tag <center>..</center>, you can use text-align:center. 'text-align' property doesn't actually aligns the division, it aligns the text content within the division.

Inline -

<div style="text-align:center">your content...</div>

Css -

.center {
  text-align:center
}

<div class="center">your content...</div>