HTML5 是 HTML 語言最受歡迎的版本之一,它支援音訊和視訊、離線儲存、行動端、和標籤屬性等等。也提供了
你有沒有曾經希望能在 HTML 中使用自訂標籤?例如:使用 和 來組織頁面,在 HTML6 裡我們希望可以直接使用象 HTML6 的標籤前有命名空間,如: 2. 3. 4. 5. 6. 8. 和 9. 就像 HTML5 一樣, HTML6 也有兩種標籤類型:單一標籤(single tag) 和雙標籤(double tag) 單標籤不需要結束符'/' HTML6 規範尚未發布,本文原作者Oscar Godson 只是為我們提供了一個對HTML6 規範的展望,或說他希望 HTML6 能夠支援的一些新特性。 以上是html6的展望與程式碼的詳細內容。更多資訊請關注PHP中文網其他相關文章!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
1. <!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" />
結語