What is the html code to create Horizontal center layout in CSS and what is the syntax to declare center. I want to display some text in center on html page.
What is the html code to create Horizontal center layout in CSS and what is the syntax to declare center. I want to display some text in center on html page.
The <center> tag is used to center text in html . The <center> tag is supported in all major browsers. However, it is deprecated and should be avoided! CENTER is defined as equivalent to DIV with ALIGN=CENTER. CENTER was introduced by Netscape before they added support for the DIV element. Example : Center text in an HTML page : <center> Text will be display in center</center>
<CENTER ...> it display the text in center <CENTER ...> is exactly equivalent to the text which is display <DIV ALIGN=CENTER>. <CENTER ...> to display text Use <DIV ALIGN=CENTER> instead. <DIV ALIGN=CENTER> HTML center tag </DIV>
Code:<P> (breakes line) This is a normal paragraph which usually means left alignment and the next text display in next line. </P> <CENTER> <P> This is text which will be centered. </P> <P> This is a longer text paragraph which will be centered.The center element was deprecated in HTML 4.01,It is so long that line breaks will most probably occur. </P> </CENTER>
Bookmarks