CSS Height/Width

by Abhishek 01-Jul-16

0 966


Set an height and width in HTML Paragraph through CSS (Cascading Style Sheet). Through below example you will understand how to use CSS.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">

<style type="text/css">

.height_width { height:200px; width:600px; margin:0 auto; background-color:#CCCCCC; padding:10px; }

</style>

</head>
<body>

<p class="height_width"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl. Donec laoreet condimentum lorem nec facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl. Donec laoreet condimentum lorem nec facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis, justo eu maximus tempor, ante ex scelerisque sem, vel auctor velit justo et nisl. Donec laoreet condimentum lorem nec facilisis. </p>

</body>
</html>


Share:


Discount Coupons



Comments

    Waiting for your comments

Leave a Reply