×

Html & Html5

The World's best Software Development Study Portal

CSS3

Introduction to CSS


CSS Line Height


Within an element if we want to define any height or want to define any height of line boxes within the element .
For Example:-

<!DOCTYPE html>

<html>

<head>

<style>

h3.anyheight {

     line-height:60px;

}

</h3>

<h3>

We can define any height within the element


though the line-height property

</h3>

<h3 class="anyheight>

We can define any height within the element


though the line-height property

</h3>

< /body>

</html>

Output of the program


We can define any height within the element
though thr line-height property.

We can define any height within the element
though the line-height property

So this is how we give the line-height between two lines.




Some more property values which we can use with the CSS line-height property.



value description
normal This is a default value. it specifies a normal line height.
number It specifies a number that is multiplied with the current font size to set the line height.
length It is used to set the line height in px, pt,cm,etc.
% It specifies the line height in percent of the current font.
initial It sets this property to its default value.
inherit It inherits this property from its parent element.






CSS 3 training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute