What is the CSS ‘display’ property and can you give a few examples of its use?
What is the CSS ‘display’ property and can you give a few examples of its use?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
<html>
<head>
<style>
p {color: blue;}
p.demo1 {display: none;}
p.demo2 {display: inline;}
p.demo3 {display: block;}
p.demo4 {display: inline-block;}
</style>
</head>
<body>
<h1>Display Property</h1>
<h2>display: none:</h2>
<div>
Lorem <p class="demo1">ipsum dolor</p> sit amet
</div>
<h2>display: inline:</h2>
<div>
Lorem <p class="demo2">ipsum dolor</p> sit amet
</div>
<h2>display: block:</h2>
<div>
Lorem <p class="demo2">ipsum dolor</p> sit amet
</div>
<h2>display: inline-block:</h2>
<div>
Lorem <p class="demo2">ipsum dolor</p> sit amet
</div>
</body>
</html>