- [html]span里面放div会带来严重问题
- HTML块
- HTML 标签
- ajax的使用以及jsonp的使用
- CSS初始化
- htmlb笔记
- HTML-div与span
- 网页设计:HTML常用的五种标签
- HTML 和
- HTML
If you use the W3C Validator to check a simple document:
<!DOCTYPE html> <html lang="en"> <head> <title>Title</title> <meta charset="utf-8"> </head> <body> <span> <div><p>Some text</p></div> Some text </span> </body></html>
it does not report an error when validating it as HTML5. If you set the doctype to "HTML 4.01 Transitional" it does. Perhaps this is just because the HTML5 validation is experimental?
The html5.validator.nu service does report an error however参考文献
- http://stackoverflow.com/questions/2919909/nesting-div-within-span-problem
- http://diophung.blogspot.jp/2014/03/web-developer-conform-to-w3c-standards.html
- http://doctype.com/span-contain-div-html5
- https://www.w3.org/wiki/Generic_containers_-_the_div_and_span_elements
- https://www.w3.org/TR/html401/struct/global.html#h-7.5.3
网友评论