DIV CSS 佈局教程網

您现在的位置: DIV+CSS佈局教程網 >> 網頁腳本 >  >> HTML基礎知識 >> HTML和Xhtml
Zen HTML Elements 速查:常用縮寫對應代碼一覽
編輯:HTML和Xhtml     

本文整理了 Zen Coding 中常用的 HTML 元素縮寫與其對應的展開代碼,方便使用 Zen Coding 的朋友隨時收藏查閱。

HTML 骨架

html:5

<!DOCTYPE HTML>
<html lang="en">
<head>
    <title></title>
    <meta charset="UTF-8">
</head>
<body>

</body>
</html>

html:xt(XHTML 1.0 Transitional)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>
<body>

</body>
</html>

html:xs(XHTML 1.0 Strict)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>
<body>

</body>
</html>

Document Metadata(文件元資訊)

head → <head></head>;title → <title></title>;base → <base href="">;link → <link>

link:css → <link rel="stylesheet" type="text/css" href="style.css" media="all">

link:print → <link rel="stylesheet" type="text/css" href="print.css" media="print">

link:favicon → <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">

link:rss → <link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">

meta:utf → <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

style → <style type="text/css"></style>

Scripting(腳本)

script → <script type="text/javascript"></script>

script:src → <script type="text/javascript" src=""></script>

noscript → <noscript></noscript>

Sections(區塊)

body → <body></body>;section → <section></section>;nav → <nav></nav>;article → <article></article>;aside → <aside></aside>;header → <header></header>;footer → <footer></footer>;address → <address></address>;div → <div></div>

Grouping Content(內容分組)

p → <p></p>;hr → <hr>;br → <br>;pre → <pre></pre>;blockquote → <blockquote></blockquote>

ol+ → <ol><li></li></ol>;ul+ → <ul><li></li></ul>;li → <li></li>

dl+ → <dl><dt></dt><dd></dd></dl>;dt → <dt></dt>;dd → <dd></dd>

Text-level Semantics(行內語義)

a → <a href=""></a>;a:link → <a href="https://"></a>;a:mail → <a href="mailto:"></a>;q → <q></q>;cite → <cite></cite>;em → <em></em>;strong → <strong></strong>;small → <small></small>;mark → <mark></mark>;abbr → <abbr title=""></abbr>;code → <code></code>;var → <var></var>;kbd → <kbd></kbd>;sub → <sub></sub>;sup → <sup></sup>;span → <span></span>;i → <i></i>;b → <b></b>

Embedded Content(嵌入內容)

img → <img src="" alt="">;iframe → <iframe src="" frameborder="0"></iframe>;embed → <embed src="" type="">;object → <object data="" type=""></object>;video → <video src=""></video>;audio → <audio src=""></audio>;canvas → <canvas></canvas>

Tabular Data(表格數據)

table+ → <table><tr><td></td></tr></table>;caption → <caption></caption>;thead → <thead></thead>;tbody → <tbody></tbody>;tfoot → <tfoot></tfoot>;tr+ → <tr><td></td></tr>;th → <th></th>;td → <td></td>

Forms(表單)

form → <form action=""></form>;form:post → <form action="" method="post"></form>;fieldset → <fieldset></fieldset>;legend → <legend></legend>;label → <label for=""></label>

input:text → <input type="text" value="" id="">;input:password → <input type="password" value="" id="">;input:checkbox → <input type="checkbox" id="">;input:radio → <input type="radio" id="">;input:submit → <input type="submit" value="">;input:file → <input type="file" id="">

button → <button></button>;select+ → <select id=""><option value=""></option></select>;option → <option></option>

Interactive Elements(互動元素)

textarea → <textarea id="" cols="30" rows="10"></textarea>;output → <output></output>;details → <details></details>;menu → <menu></menu>

Conditional Comments(條件註釋)

cc:ie → <!--[if IE]><![endif]-->

cc:noie → <!--[if !IE]><!--><!--<![endif]-->

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved