div tag
TAG: center
deprecated 4.0
<center> ... </center>
Available in versions: 3.2
Browser compatibility: Explorer 4, 5 Netscape 4, 6
The
<center>
tag is officially deprecated effective with HTML 4.0. Instead, you are now to use style sheets. However, this tag remains in wide use on the Internet and is recognized by all major browsers.
The
<center>
tag is used to align the selected element in the center of the window with respect to the right and left borders. This is a very easy way to center text, tables, and images.
The centering effect starts with the opening
center
tag and continues until the closing tag. Therefore, the closing tag is mandatory.
Core Attributes
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Attributes
none.
Code:
<center>
<b>The Guru At</b>
<br>
<img src="images/guru.gif">
</center>
Output:
The Guru At
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information