Introduction:
You may be familiar with the HTML
align
attribute (which has been discontinued as of HTML 5). The align
attribute could be used with tags such as <table>
, <td>
, and <img>
to specify the alignment of these elements. This attribute allowed you to align elements horizontally. HTML also has/had a valign
attribute for aligning elements vertically. This has also been discontinued from HTML5.
These attributes were discontinued in favor of using CSS to set the alignment of HTML elements.
There isn't actually a CSS
align
or CSS valign
property. Instead, CSS has the text-align
which applies to inline content of block-level elements, and vertical-align
property which applies to inline level and table cells.
Example:
<html> <head> <title></title> </head> <body> <html> <head> <title></title> </head> <body> </body> </html> </body> </html>
0 comments :
Post a Comment