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.

Did you like it or was it useful?

Help us share it 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.

IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Sponsored content:
 

Leave your Comment

SPONSOR

Your business can also appear here. More information