Tuesday, August 20, 2013

CSS text alignment

<html>
<head>
<style type="text/css">
h1 {text-align:center}
p.date {text-align:right}
p.main {text-align:justify}
</style>
</head>

<body>
<h1>CSS text-align Example</h1>
<p class="date">May, 2009</p>
<p class="main">A flower, sometimes known as a bloom or blossom, is the reproductive structure found in flowering plants (plants of the division Magnoliophyta, also called angiosperms). The biological function of a flower is to mediate the union of male sperm with female ovum in order to produce seeds. The process begins with pollination, is followed by fertilization, leading to the formation and dispersal of the seeds. For the higher plants, seeds are the next generation, and serve as the primary means by which individuals of a species are dispersed across the landscape. The grouping of flowers on a plant are called the inflorescence.</p>
<p><b>Note:</b> Try to resize the browser window to see how justify works.</p>
</body>

</html>

Result


No comments: