HTML标签基础

来源:互联网 发布:mac 垃圾清理软件 编辑:程序博客网 时间:2024/05/16 07:28
a结构
 <!doctype><!--定义文档类型-->
          <html>
     <head>
         <meta charset="utf-8" />
 <title>Document</title>
     </head>
     <body>
         内容
     </body>
 </html>


 b元素
 <p></p>
 <h1></h6>
 <br/>
 <hr/>
 <i></i>
 <span></span>
 <u></u>
 <b></b>
 <s></s>
 <sub></sub>
 <sup></sup>
 <strong></strong>
 <img src="" alt="" title="" width="" height="" />


 c实体
 &nbsp;
 &gt;
 &lt;
 &amp;
 &copy;
 &reg;


 d、路径
 1、绝对路径


 2、相对路径
 (1)同级:直接写文件名
 <img src="image1.jpg" />
 (2)父级:先返回本级,再找
 <img src="../image.jpg" />
 (3)子级:先进入子级目录,再查找
 <img src="images/image.jpg" />


 ----------------------------------------------------------------------------------------------------------------------
 day02
  1. a标签:超链接
         链接到目标地址 
       <a href="路径" target="目标">内容</a>
       href="#"   当前面页
       target属性:
          1、_blank   在空白面页打开
      2、_self
链接到邮箱:
<a href="mailto:xubenjun@163.com" target="">我的邮箱</a>


2.  列表
    (1)有序列表
         <ul type="">
     <li>内容<li>  每一列的内容
 <li>内容<li>  每一列的内容
 </ul>
 type属性值:none
                       circle空心圆
disc     实心圆(默认为实心圆)
suqare实心小方块
(2)无序列表
<ol type="" start="">
<li></li>
<li></li>
<li></li>
</ol>
type属性值:1 | I | a | A    默认为阿拉伯数字
start从几开始
(3)自定义列表
<dl>
<dt>自定义标题</dt>
<dd>自定义内容</dd>
<dd>自定义内容</dd>
<dd>自定义内容</dd>
</dl>


3、公共  *属性*
*注意: <head></head> <style></style><title></title>没有公共属性


(1)title="内容提示"
(2)style="样式1:值1;样式2:值2;样式n:值n;"
(3)id="确定网页中唯一的名称"
(4)class="确定网页中某一类的名称"
0 0
原创粉丝点击