Copyright © tutorialspoint.com

CSS - display

previous next


Advertisements

Description:

The display property affects the most basic presentation of an element, effectively classing the element as a certain type of element. The rendering of the element may depend heavily on its display type, and certain properties will only work on elements that have specific display values.

Possible Values:

Applies to:

All the HTML elements.

DOM Syntax:

object.style.cueAfter=url("music.wav");

Example:

Here is the example:

<p style="display:inline;">
This paragraph will inline with the next paragraph
</p>
<p style="display:inline;">
and will make a single line.
</p>
<br />
<br />
<div style="display:block;">
This paragraph will be separate from the next parahgraph
</div>
<div style="display:block;">
and this is second paragraph.
</div>

This will produce following result:

This paragraph will inline with the next paragraph

and will make a single line.



This paragraph will be separate from the next parahgraph
and this is second paragraph.

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com