日期:2013-10-12  浏览次数:20630 次

通过ALIGN属性可以选择文字或图片的对齐方式,LEFT表示向左对齐,RIGHT表示向右对齐,CENTER表示居中。基本语法如下:

     <DIV ALIGN=#>   #=left/right/center


例:

<html>
<head>
<title>位置控制</title>
</head>

<body>
<div align=left>
你好!<br>
<div align=right>
你好!<br>
<div align=center>
你好!<br>
</body>

</html>


  另外,ALIGN属性也常常用在其它标签中,惹起其内容位置的变动。

  如:<P ALIGN=#>
    <HR ALIGN=#>   #=left/right/center
    <H1 ALIGN=#〉