|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>HTML align attribute to CSS - HTML Purifier Specimen</title>
- <style type="text/css">
- div.container {position:relative;height:110px;}
- div.container.legend .test {text-align:center;line-height:100px;}
- div.test {width:100px;height:100px;border:1px solid black;
- position:absolute;top:10px;}
- div.test.html {left:10px;}
- div.test.css {left:140px;}
- table {background:#F00;}
- img {border:1px solid #000;}
- hr {width:50px;}
- div.segment {width:250px; float:left; margin-top:1em;}
- </style>
- </head>
- <body>
-
- <h1>HTML align attribute to CSS</h1>
-
- <p>Inspect source for methodology.</p>
-
- <div class="container legend">
- <div class="test html">
- HTML
- </div>
- <div class="test css">
- CSS
- </div>
- </div>
-
- <div class="segment">
-
- <h2>table.align</h2>
-
- <h3>left</h3>
- <div class="container">
- <div class="test html">
- a<table align="left"><tr><td>O</td></tr></table>a
- </div>
- <div class="test css">
- a<table style="float:left;"><tr><td>O</td></tr></table>a
- </div>
- </div>
-
- <h3>center</h3>
- <div class="container">
- <div class="test html">
- a<table align="center"><tr><td>O</td></tr></table>a
- </div>
- <div class="test css">
- a<table style="margin-left:auto; margin-right:auto;"><tr><td>O</td></tr></table>a
- </div>
- </div>
-
- <h3>right</h3>
- <div class="container">
- <div class="test html">
- a<table align="right"><tr><td>O</td></tr></table>a
- </div>
- <div class="test css">
- a<table style="float:right;"><tr><td>O</td></tr></table>a
- </div>
- </div>
-
- </div>
-
- <!-- ################################################################## -->
-
- <div class="segment">
- <h2>img.align</h2>
- <h3>left</h3>
- <div class="container">
- <div class="test html">
- a<img src="img.png" align="left">a
- </div>
- <div class="test css">
- a<img src="img.png" style="float:left;">a
- </div>
- </div>
-
- <h3>right</h3>
- <div class="container">
- <div class="test html">
- a<img src="img.png" align="right">a
- </div>
- <div class="test css">
- a<img src="img.png" style="float:right;">a
- </div>
- </div>
-
- <h3>bottom</h3>
- <div class="container">
- <div class="test html">
- a<img src="img.png" align="bottom">a
- </div>
- <div class="test css">
- a<img src="img.png" style="vertical-align:baseline;">a
- </div>
- </div>
-
- <h3>middle</h3>
- <div class="container">
- <div class="test html">
- a<img src="img.png" align="middle">a
- </div>
- <div class="test css">
- a<img src="img.png" style="vertical-align:middle;">a
- </div>
- </div>
-
- <h3>top</h3>
- <div class="container">
- <div class="test html">
- a<img src="img.png" align="top">a
- </div>
- <div class="test css">
- a<img src="img.png" style="vertical-align:top;">a
- </div>
- </div>
-
- </div>
-
- <!-- ################################################################## -->
-
- <div class="segment">
-
- <h2>hr.align</h2>
-
- <h3>left</h3>
- <div class="container">
- <div class="test html">
- <hr align="left" />
- </div>
- <div class="test css">
- <hr style="margin-right:auto; margin-left:0; text-align:left;" />
- </div>
- </div>
-
- <h3>center</h3>
- <div class="container">
- <div class="test html">
- <hr align="center" />
- </div>
- <div class="test css">
- <hr style="margin-right:auto; margin-left:auto; text-align:center;" />
- </div>
- </div>
-
- <h3>right</h3>
- <div class="container">
- <div class="test html">
- <hr align="right" />
- </div>
- <div class="test css">
- <hr style="margin-right:0; margin-left:auto; text-align:right;" />
- </div>
- </div>
-
- </div>
-
- </body>
- </html>
|