What is the browser's default display value (like block
or inline
) for a list element?
Is there a list where can look up things like that? I tried to look at the HTML5 specs, but as there are so many versions of it I didn't knew which one was binding or if any of them is binding at all as HTML5 is still in development.
The default display value for most elements is block or inline .
We can change the default value of how will the HTML element be rendered using the CSS Display property. NOTE − The <div> element has a default CSS display set to block and <span> element has a default CSS display set to inline.
In <ul> and <menu>, the list items will usually be displayed with bullet points. In <ol>, the list items will usually be displayed with numbers or letters.
Lists (as in the <ul>
element itself) are displayed as block-level elements. List members display as list-item
, which is a special case of block-ness.
As for documentation, you can see a full list of block-level elements on the Mozilla Developer Network (https://developer.mozilla.org/en-US/docs/HTML/Block-level_elements), and likewise inline elements (https://developer.mozilla.org/en-US/docs/HTML/Inline_elements).
MDN is a great resource, and well worth remembering.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With