Heim > Artikel > Web-Frontend > HTML6 展望_html/css_WEB-ITnose
HTML5 是 HTML 语言最受欢迎的版本之一,它支持音频和视频、离线存储、移动端、和标签属性等等。还提供了
你有没有曾经希望能在 HTML 中使用自定义标签?比如:使用 和 XML 一样,HTML6 应该支持 namespace(命名空间),如:xmlns:xhtml=”http://www.w3.org/1999/xhtml” HTML6 代码样例: 在上面的代码中,你也许注意到了一些奇怪的 HTML6 的标签前带有命名空间,如:, 1. 2. 3. 4. 5. 6. 8. 和 9. 和 HTML5 一样, HTML6 也有两种标签类型:单标签(single tag) 和双标签(double tag) 单标签不需要结束符’/’ HTML6 规范还未发布,本文原作者Oscar Godson 只是为我们提供了一个对 HTML6 规范的展望,或者说他希望 HTML6 能够支持的一些新特性。 <!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> <html:meta type="title" value="Page Title"> <html:meta type="description" value="HTML example with namespaces"> <html:link src="css/mainfile.css" title="Styles" type="text/css"> <html:link src="js/mainfile.js" title="Script" type="text/javascript"> </html:head> <html:body> <header> <logo> <html:media type="image" src="images/xyz.png"> </logo> <nav> <html:a href="/img1">a1</a> <html:a href="/img2">a2</a> </nav> </header> <content> <article> <h1>Heading of main article</h1> <h2>Sub-heading of main article</h2> <p>[...]</p> <p>[...]</p> </article> <article> <h1>The concept of HTML6</h1> <h2>Understanding the basics</h2> <p>[...]</p> </article> </content> <footer> <copyright>This site is © to Anonymous 2014</copyright> </footer> </html:body> </html:html>
HTML6 APIs
<!DOCTYPE html> <html:html>// this is equivalent to <html> tag written in previous HTML versions <!-- sample of HTML document --> </html:html>
<!DOCTYPE html> <html:html> <html:head> <!-- Main content would come here, like the <html:title> tag --> </html:head> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> </html:head> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> <html:meta type="description" value="HTML example with namespaces"> </html:head> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> <html:link src="js/mainfile.js" title="Script" type="text/javascript"> </html:head> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> </html:head> <html:body> <!-- This is where your website content is placed --> </html:body> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> </html:head> <html:body> <html:a href="http://siteurl">Go to siteurl.com!</html:a> </html:body> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> </html:head> <html:body> <html:button>Click Here</html:button> </html:body> </html:html>
<!DOCTYPE html> <html:html> <html:head> <html:title>A Look Into HTML6</html:title> </html:head> <html:body> <!-- Image would come here --> <html:media src="img1/logo.jpg" type="image"> <!-- Video doesn't need a type --> <html:media src="videos/slide.mov"> </html:body> </html:html>
标签类型(Tag types)概述
<html:meta type="author" content="single tag"> <html:meta type="author" content="double tag" />
语