+ 9

How do you align a form to the center of a webpage in HTML 5?

How do you align a form to the center of a webpage in HTML 5? because align: center; no longer works in HTML 5.

8th Apr 2017, 8:21 PM
PureLogicality
PureLogicality - avatar
2 Answers
+ 12
<center> tag is also deprecated in Html5, as 'align' html attribute, but both can be replaced with 'text-align:center;' css attribute rule applied to content of an html element, or with 'margin:auto;' to center a block element defined with a fixed width ( relative or absolute units, needs just to be set to other value than default full width )...
8th Apr 2017, 8:39 PM
visph
visph - avatar
+ 2
Use CSS
8th Apr 2017, 8:39 PM
Ali Emir Kızıl
Ali Emir Kızıl - avatar