本节我们整理了一份 html 速查列表. 你可以打印它,以备日常使用
html 基本结构
<!DOCTYPE?html> <head> < Meta ?charset="utf-8"> <title>前端之家?f2er.com</title> </head> <body> 可见文本... </body> </html>
基本的 标签
<h1>最大的 标题 </h1> <h2>?.?.?.?</h2> <h3>?.?.?.?</h3> <h4>?.?.?.?</h4> <h5>?.?.?.?</h5> <h6>最小的 标题 </h6> <p>这是 一个 段落</p> <br>?(换行) <hr>?(水平线) <!--?这是注释?-->
文本格式化 标签
<b>粗体文本</b> <code>计算机 代码 </code> <em>强调文本</em> <i>斜体文本</i> <kbd> 键盘 输入</kbd>? <pre>预格式化文本</pre> <small>更小的文本</small> <strong>重要的文本</strong> <abbr>?(缩写) <address>?(联系信息) <bdo>?( 文字 方向) <blockquote>?(从另 一个 源引用的部分) <cite>?(工作的 名称 ) <del>?( 删除 的文本) <ins>?(插入的文本) <sub>?(下标文本) <sup>?(上标文本)
链接
普通的 链接 :<a?href="http://www.example.com/"> 链接 文本</a> 图像 链接 :??<a?href="http://www.example.com/"><img?src="URL"?alt="替换文本"></a> 邮件 链接 :??<a?href="mailto:webmaster@example.com">发送e-mail</a> 锚文本: <a?id="tips"> 提示 部分</a> <a?href="#tips">跳到 提示 部分</a>
图片
<img?src="URL"?alt="替换文本"?height="42"?width="42">
样式
<style> h1{color:red;}p{color:blue;} </style>
区块
<div>文档中的块级元素</div> <span>文档中的内联元素</span>
无序列表
<ul> ????<li>项目</li> ????<li>项目</li> </ul>
有序列表
<ol> ????<li>第一项</li> ????<li>第二项</li> </ol>
定义列表
<dl> ??<dt>项目?1</dt> ????<dd>描述项目?1</dd> ??<dt>项目?2</dt> ????<dd>描述项目?2</dd> </dl>
表格
<table?border="1"> ??<tr> ????<th>表格 标题 </th> ????<th>表格 标题 </th> ??</tr> ??<tr> ????<td>表格数据</td> ????<td>表格数据</td> ??</tr> </table>
框架
<iframe?src="demo_iframe.htm"></iframe>
表单
<form?action="demo_form. PHP "?method="post/get"> <input?type="text"?name="email"?size="40"?maxlength="50"> <input?type="password"> <input?type="check Box "?checked="checked"> <input?type="ra dio "?checked="checked"> <input?type="submit"?value="Send"> <input?type="reset"> <input?type="hidden"> <select> <option>苹果</option> <option?selected="selected">香蕉</option> <option>樱桃</option> </select> <textarea?name="comment"?rows="60"?cols="20"></textarea> </form>
HTML 实体
<?等同于?< >?等同于?> ©?等同于??
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did91840