APPLY NOW HERE :: FREE REGISTERATION ONLINE
Want to know more about us and our multimedia, animation & web design courses, feel free to Contact Us. We would love to hear from you.
The display
property specifies how an element is displayed. Every HTML element has a default display value depending on what type of element it is. The default display value for most elements is block
or inline
.
A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
Examples of block-level elements:
<div>
<h1> - <h6>
<p>
<form>
<header>
<footer>
<section>
An inline element only takes up width as much as necessary.
Examples of inline elements:
<span>
<a>
<img>
display: none;
is usually used with JavaScript to show and hide elements without deleting and recreating them.
Every element has a default display value and you can override this. Changing an inline element to a block element, or vice versa, can be useful for making the page look a specific way, and still follow the web standards.
Setting the display property of an element only changes how the element is displayed, NOT what type of element it is. So, an inline element with display: block;
is not allowed to have other block elements inside it.
The following example of displaying <span
> and <a
> elements as block elements:
In HTML you can hide any element by just setting the display
property to none
and the page will be displayed as if the element is not there:
In HTML you can hide any element by just setting the visibility
property to hidden
and the element will be hide but it will still take up the same space as before.
Mobile Number :
9891 222 738,
9891 50 1300
E-mail : contactbapugraphics@gmail.com
ADDRESS: H-17 / 263, First Floor,Sector 7,
Near Rohini West Metro Station,
Opposite Metro Pillar No. 425
Rohini, Delhi - 110085
Day | Timing |
Monday To Friday | 8:00 Am To 7:00Pm |
Saturday | 10:00 Am To 6:00Pm |
Want to know more about us and our multimedia, animation & web design courses, feel free to Contact Us. We would love to hear from you.