when im writing html code inside of anchor tag, my dreamweaver editor showing bug in anchor tag. Shouldnt use inside tag? Is there any rules writing/using tags ?
I am using Html 5. This is my code. http://jsfiddle.net/CfPnj/
Use the <ul> tag together with the <li> tag to create unordered lists.
The short answer is that ol elements are not legally allowed inside p elements.
The children (direct descendants) of a ul element must all be li elements. This is a purely syntactic requirement. The way to fix the error depends on semantics, however. If the inner lists correspond to subtopics of the topic of the preceding li , then you should wrap the inner list inside that li , e.g.
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.
In HTML5, you can put block elements insize <a>
elements. See http://dev.w3.org/html5/markup/a.html#a-changes
This is new in HTML5. In any other version of HTML, it's illegal.
Update (added later, when I understood HTML5 better)
This is because <a>
's content model was changed from inline to transparent. In other words, what you can put inside an <a>
is now the same as what you can put in <a>
's parent. The actual answer to the question here is, "it depends".
For instance,
<div><a><ul><li></ul></a></div>
is perfectly valid HTML5, while
<span><a><ul><li></ul></a></span>
is not (because span
is an inline element).
Hope this helps!
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