Display in CSS

While the specification defines exactly what the block elements are and which inline elements, there is an instruction with which you can invert those natural definitions.

Display in CSS | Learn CSS | While the specification defines exactly what the block elements are and which inline elements, there is an instruction with which you can invert those natural definitions

While the specification defines exactly what the block elements are and which are the inline elements, there is an instruction with which you can reverse those "natural" definitions. For example, any block element can be represented as an inline element, and vice versa. You can even suppress the representation of any element (and can also be rendered invisible).

Let's see some examples (exceptionally with the inline style):

<div style=”display: inline;”>part of a text</div>

The block element becomes an inline element.

<a href=”foot.html” style=”display: block;”>texto del link</a>

The inline element becomes a block element.

<div style=”display: none;”>part of a text</div>

The item is not displayed. We must bear in mind that the sample is completely deleted without counting at all with the space occupied by the element or reserve it. The contiguous elements are not affected in their size or position.

🤖

ChatGPT Free
Ask questions on any topic

CITE ARTICLE


For homework, research, thesis, books, magazines, blogs or academic articles

APA Format Reference:

Delgado, Hugo. (2019).
Display in CSS.
Retrieved Oct 06, 2024, from
https://disenowebakus.net/en/display-css

Participates!

Share it with your friends in Social Networks!

Professor at the University of Guadalajara

Hugo Delgado Desarrollador y Diseñador Web en Puerto Vallarta

Professional in Web Development and SEO Positioning for more than 10 continuous years.
We have more than 200 certificates and recognitions in the Academic and Professional trajectory, including diploma certificates certified by Google.

CONTINUE LEARNING

IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Related content:

Would you like to learn more about Web Design?

Meet all the courses and tutorials that we have for you completely free
Learn Web Design
 

Leave your Comment

SPONSOR

Your business can also appear here. More information

Your browser has blocked advertising.
Please 🙏 allow to visualize the announcements to be able to access, thank you.