wgabrie wrote:Why do nested list tags stay open in the Dialog tag example?
To reveal browser bugs?
Or perhaps because it's allowed and makes the source code less verbose, or is just easier to type?
wgabrie wrote:The dialog tag is a block level element and this can be set using CSS:
- Code: Select all
dialog {display:block;}
Just to be clear: <dialog> is a block-level element in HTML regardless of CSS 'display'.
wgabrie wrote:I tested Dialog with other content. The content that comes after the dialog block is formated as part of the definition. You cannot stop the list by putting it in a block-level element.
Test case:
- Code: Select all
<!doctype html>
<title>Unclosed <dd> in <dialog></title>
<style>
p { background:lime; }
dialog p { background:red; }
</style>
<dialog>
<dd>
</dialog>
<p>This line should have a green background.
The line is green in IE, Firefox and Safari, but red in Opera. So you have found a parsing bug in Opera.
I've reported it (#261248). Cheers.