Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nesting multiple div tags inside an li tag

Tags:

html

xhtml

Is it possible and valid to nest a <div> tag inside an <li> tag multiple times?

like image 301
ELEMENT Avatar asked May 17 '10 04:05

ELEMENT


People also ask

Can you nest div inside li?

It is perfectly allowed to nest <div> elements in <li> and <dd> elements. <li> / <dd> elements may contain flow content, which <div> elements are. Save this answer.

How do I put multiple divs in one line?

By default, if we have multiple div tags it will be displayed one below the other. In othere words, each div will be displayed in a separate line. To display multiple div tags in the same line, we can use the float property in CSS styles. The float property takes left, right,none(default value) and inherit as values.

Can div go in UL?

"div's inside ul's are totally legit in html5 and you won't be hurting anything, its honestly that easy.

What elements can go inside UL?

HTML ul element can reside within APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH.


1 Answers

You can nest <div> tags inside of each-other and inside of <li> tags.

You can also put <li> tags in <ul> or <ol> tags that are inside of <div> tags.

like image 149
SLaks Avatar answered Sep 22 '22 13:09

SLaks