5. 简化的Doctype声明
之前的各种HTML(XHTML)中的Doctype声明
HTML5
安博中程在线
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
HTML
<!doctype html> HTML
5/50
25. <details>和<summary>
Copyright 1999-2011.
Details
If your browser supports this element, it should allow you to expand and collapse these details.
安博中程在线
details 标签指定了附加的详细信息,用户可以根据需要展开查看或者隐藏。
可以使用details 创建一些可以跟用户交互的小插件。
details 中可以放置任何内容。
可以给details 指定open 属性,指定初始是展开还是隐藏的。
目前仅Chrome和Mac上的Safari支持。
·
·
·
·
·
<details>
<summary>Copyright 1999-2011.</summary>
<p> - by Refsnes Data. All Rights Reserved.</p>
<p>All content and graphics on this web site are the property of the company Refsnes Data.</p>
</details>
<details open="open">
<p>If your browser supports this element, it should allow you to expand and collapse these details.</p>
</details>
HTML
25/50