How to use Height and Width property in HTML using CSS

 => open ur text editer :-

=> And save it as propert_height_width.html and write below code:-


<html>

<head>

<style type="text/css">

p{

border: 1px solid #a1a1a1;

width: 100%;

height: 150px;

overflow-x: hidden;

overflow-y: scroll;

}

</style>

</head>

<body>

<p>

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

<br /><br />

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

<br /><br />

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

<br /><br />

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

<br /><br />

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

<br /><br />

HTML, by default,is not so attractive...

...This paragraph has fixed height of 150px,

width wise there are no issues. But, when content

in paragraph increases, it "overflows" out of the 

tag. In such cases, to maintain width, scroll bars 

are used.

</p>

</body>

</html>


=>then run on ur browser.

=>if u download source code then click on below link :-

Download Source Code

Comments

Popular posts from this blog

How to create simple biodata form in html

How to use cursor property in HTML using CSS