HTML学习笔记—标签

标记:

文档类型定义:<!doctype html>

字符编码:<meta charset="utf-8">  //放在head元素中所有其他元素之上

<html>
    <head>
        <title>...</title>
    </head>
    <body>
        <h1>...</h1>
        <p>...</p>
    </body>
</html>

显示图像信息:<image src="url" alt="introduce of the image" src="url">

//一定要写:<!doctype html>,<meta>,<head>里的<title>,<image>里的alt

链接:<a href="url"></a>

  对链接增加工具提示:<a href="url" title="introduce of the href">....</a>

  链接到页面中的某部分:1.对目标部分添加id属性:<h1 id="id_name">...</h1>

                                          2.链接处url添加#id_name:<a href="...html#id_name">...</a>

  链接到新窗口:<a target="_blank" href="http://...">...</a>

引用:<q></q>

块引用:<blockquote></blockquote>

强调:<strong></strong>

用不同方式展示:<em></em>

换行:<br>

列表:<li></li>

有序列表:<ol></ol>

无序列表:<ul></ul>

<ol>
    <li>...</li>
    <li>...</li>
    <li>...</li>
</ol>

定义列表:<dl></dl>

<dl>
    <dt>...</dt>
    <dd>...</dd>
</dl>

展示代码:<code></code>

日期/时间:<time></time>

原样输出文本:<per></per>

字符实体:<  &lt;   >  &gt;  &  &amp;    版权符号  &copyright;

                更多字符实体列表:http://www.unicode.org/charts/

文章:<article></article>

链接到外部样式表:<link rel="stylesheet" href="xxx.css">

块级分区:<div></div>

内联分区:<span></span>

导航:<nav>

posted @ 2018-09-16 12:27  程嘿嘿  阅读(168)  评论(0编辑  收藏  举报