1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <title>HTML align attribute to CSS - HTML Purifier Specimen
</title>
6 <style type=
"text/css">
7 div
.container
{position:relative
;height:110px;}
8 div
.container
.legend
.test
{text-align:center
;line-height:100px;}
9 div
.test
{width:100px;height:100px;border:1px solid black
;
10 position:absolute
;top:10px;}
11 div
.test
.html
{left:10px;}
12 div
.test
.css
{left:140px;}
13 table
{background:#F00;}
14 img
{border:1px solid
#000;}
16 div
.segment
{width:250px; float:left
; margin-top:1em;}
21 <h1>HTML align attribute to CSS
</h1>
23 <p>Inspect source for methodology.
</p>
25 <div class=
"container legend">
26 <div class=
"test html">
29 <div class=
"test css">
39 <div class=
"container">
40 <div class=
"test html">
41 a
<table align=
"left"><tr><td>O
</td></tr></table>a
43 <div class=
"test css">
44 a
<table style=
"float:left;"><tr><td>O
</td></tr></table>a
49 <div class=
"container">
50 <div class=
"test html">
51 a
<table align=
"center"><tr><td>O
</td></tr></table>a
53 <div class=
"test css">
54 a
<table style=
"margin-left:auto; margin-right:auto;"><tr><td>O
</td></tr></table>a
59 <div class=
"container">
60 <div class=
"test html">
61 a
<table align=
"right"><tr><td>O
</td></tr></table>a
63 <div class=
"test css">
64 a
<table style=
"float:right;"><tr><td>O
</td></tr></table>a
70 <!-- ################################################################## -->
75 <div class=
"container">
76 <div class=
"test html">
77 a
<img src=
"img.png" align=
"left">a
79 <div class=
"test css">
80 a
<img src=
"img.png" style=
"float:left;">a
85 <div class=
"container">
86 <div class=
"test html">
87 a
<img src=
"img.png" align=
"right">a
89 <div class=
"test css">
90 a
<img src=
"img.png" style=
"float:right;">a
95 <div class=
"container">
96 <div class=
"test html">
97 a
<img src=
"img.png" align=
"bottom">a
99 <div class=
"test css">
100 a
<img src=
"img.png" style=
"vertical-align:baseline;">a
105 <div class=
"container">
106 <div class=
"test html">
107 a
<img src=
"img.png" align=
"middle">a
109 <div class=
"test css">
110 a
<img src=
"img.png" style=
"vertical-align:middle;">a
115 <div class=
"container">
116 <div class=
"test html">
117 a
<img src=
"img.png" align=
"top">a
119 <div class=
"test css">
120 a
<img src=
"img.png" style=
"vertical-align:top;">a
126 <!-- ################################################################## -->
128 <div class=
"segment">
133 <div class=
"container">
134 <div class=
"test html">
137 <div class=
"test css">
138 <hr style=
"margin-right:auto; margin-left:0; text-align:left;" />
143 <div class=
"container">
144 <div class=
"test html">
145 <hr align=
"center" />
147 <div class=
"test css">
148 <hr style=
"margin-right:auto; margin-left:auto; text-align:center;" />
153 <div class=
"container">
154 <div class=
"test html">
157 <div class=
"test css">
158 <hr style=
"margin-right:0; margin-left:auto; text-align:right;" />