I am just curious as to why the <center> tag in HTML was deprecated.
The <center> was a simple way of quickly center-aligning blocks of text and images by encapsulating the container in a <center> tag, and I really cannot find any simpler way on how to do it now.
Anyone know of any simple way on how to center “stuff” (not the margin-left:auto; margin-right:auto; and width thing), something that replaces <center> ? And also, why was it deprecated?
The
<center>element was deprecated because it defines the presentation of its contents — it does not describe its contents.One method of centering is to set the
margin-leftandmargin-rightproperties of the element toauto, and then set the parent element’stext-alignproperty tocenter. This guarantees that the element will be centered in all modern browsers.