Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML/CSS: Default display value for list element?

Tags:

html

css

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.

like image 909
Sven Avatar asked Oct 16 '13 18:10

Sven


People also ask

What is the default display style for a list item?

The default display value for most elements is block or inline .

Can CSS set default display value?

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.

What is the default display property of Li tag?

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.


1 Answers

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.

like image 193
Jimmy Breck-McKye Avatar answered Oct 05 '22 23:10

Jimmy Breck-McKye