| HTML attributes |
CSS Method |
Description |
Align = "left" Align = "right" |
Float: left; Float: right; |
Float with CSSAny element: Pictures, paragraphs, Div, title, table, list, etc. When you use the float attribute, you must define a width for the floating element. |
| Marginwidth = "0" leftmargin = "0" marginheight = "0" topmargin = "0" |
Margin: 0; |
With CSS, margin can be set inAnyIn addition to the Body element, you can specify the top, right, bottom, and left margin values of the element. |
| Vlink = "#333399" alink = "#000000" link = "# 3333ff" |
A: link # 3ff; A: visited: #339; A: hover: #999; A: active: # 00f; |
In HTML, the link color is defined as a property value of the body. The link style of the entire page is the same. With the CSS selector, the link styles of different parts of the page can be different. |
| Bgcolor = "# ffffff" |
Background-color: # FFF; |
In CSS, any element can define the background color, not only the body and table elements. |
| Bordercolor = "# ffffff" |
Border-color: # FFF; |
You can set a boeder for any element. You can define top, right, bottom, and left respectively. |
Border = "3" Cellspacing = "3" |
Border-width: 3px; |
With CSS, you can define the border of a table as a uniform style, or you can define the color, size, and style of the top, right, bottom, and left border respectively. You can use the table, TD or th selectors. If you need to set the border-less effect, you can use the CSS definition: border-collapse: collapse; |
<Br clear = "Left"> <Br clear = "right"> <Br clear = "all"> |
Clear: left; Clear: right; Clear: both; |
Many 2-or 3-column la s are located using the float attribute. If you define the background color or background image in the floating layer, you can use the clear attribute. |
Cellpadding = "3" Vspace = "3" Hspace = "3" |
Padding: 3px; |
With CSS, you can set the padding attribute for any element. Similarly, you can set top, right, bottom and left for padding respectively. Padding is transparent. |
| Align = "center" |
Text-align: center; Margin-Right: auto; margin-left: auto; |
Text-align only applies to text. Block-level complaints such as Div and P can be horizontally centered through margin-Right: auto; and margin-left: auto; |