Is there only display inline and block by default in the elements or others?

Asked

Viewed 113 times

0

I see a lot on the Internet talking so much about just display: inline and display: block, but in tables, for example in the element <table> his display is display: table, I wonder if:

  • There are other standard displays in the elements besides the ones mentioned?
  • Because only inline and block are relevant?

2 answers

4


In fact, basically the standard HTML5 elements come by default with the types:

  • block (H1, H2, H3..., p, div, header, Section, article, etc...)
  • inline (span, Strong, em, image, etc)
  • inline-block (input, select...)
  • list-item (li, ...)
  • table, table-Row, table-Cell, etc... (applied by default to table elements)
  • None (head, title, meta)

On the list above there may be a few more maybe that I’m forgetting... but I don’t think.

The point is not to be relevant... but rather, are the ones that exist since the dawn of css and so are the essentials..

The most recent values of the display property (flex, grid and others) do not come by default from the browser in any native html element. But you can use them to satisfy your need.

1

There are many more, each supplying a different need. For example: Content, grid, flex, flex-inline, among others.

They are considered more relevant because they have more time of use (older if you prefer). Nowadays I try to do almost everything with flex, by adapting to Grids.

You can follow everyone on this site: w3schools/css-display

  • For example, the element <p> it has the standard display for block, but the ones you mentioned use these views by default?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.