td text-align: justify; : td text « Tags « HTML / CSS






td text-align: justify;

    
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type='text/css'>
td {
  width:300px;
  font:12pt arial;}

td.leftAlign {text-align:left;}
td.rightAlign {text-align:right;}
td.center {text-align:center;}
td.justify {text-align:justify;}
</style>


</head>

<body>
<table>
  <tr><td class="leftAlign">Some left-aligned text.</td></tr>
  <tr><td class="rightAlign">Some right-aligned text.</td></tr>
  <tr><td class="center">Some centered text.</td></tr>
  <tr><td class="justify">Some justified text, there needs to be enought text here for the words to wrap across several lines in order for you to see the effect of this option properly. The text should stretch to both the left and the right sides on every line. </td></tr>
</table>
</body>
</html>

   
    
    
    
  








Related examples in the same category

1.'abbr' sets the abbreviated text for the cell and replace the cell contents
2.'ch' is a character that specifies the alignment of subsequent text
3.td text-align: center; and border
4.Text Indent
5.td text-align: center;
6.td text-align: left;
7.td text-align: right;
8.td text-transform: lowercase;
9.td border: thin solid black;text-align: center;font-weight: bold;