html总结1

最近对HTML做了新的回顾,没有掌握的知识点重新记录

1、www:world wide web 全球信息网

2、www分为两部分:server客户端 ,client服务器。两者之间的通讯方式是通过http(HyperText Transfer Protocol)超文本传输协议进行沟通的。

3、URL地址:Uniform Resource Locator 统一资源定位器,用于指定要取得的Internet上资源的位置与方式。

<!DOCTYPE html><!--html5标准进行解析-->
<html xmlns="http://www.w3.org/1999/xhtml"><!--w3c统一规范-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><!--页面内容类型 用utf-8的模式进行解析-->
   <meta http-equiv="X-UA_Compatible" content="IE=edge" /><!--以最新的IE进行渲染 meta声明用的-->
   <link rel="shortcut icon" href="img/logo.png"><!--icon 图标 link做链接用哪个 -->
<title></title> 
</head>
<body>
</body>
</html>

4、空格:&nbsp;中文状态下一个字符  &ensp;英文状态下一个字符

5、<pre>预文本  p标签 空格&nbsp;&ensp; br换行有效

      一个文本</pre> 可以固定样式  

6、列表

    无序列表

    

ul列表type属性为square/circle但html5已不支持,用css代替为list-style-type:square;list-style-type:circle;

可以用自定义图片代替前面的序号

ul {list-style-image:url(http://www.runoob.com/try/demo_source/sqpurple.gif);padding-left:14px;background-repeat:no-repeat;
background-position:0px 5px; }

   有序列表

ol列表type属性为I/a用css代替为list-style-type:upper-roman;list-style-type:lower-alpha;list-style-type:1;

7、表格

<table border="1">
<caption align=top>来吃饭</caption> <tr> <td rowspan="4">早餐类</td> <td colspan="2">价格表</td> </tr> <tr> <td>汉堡</td> <td>25元</td> </tr> <tr> <td>三明治</td> <td>25元</td> </tr> <tr> <td>土司</td> <td>25元</td> </tr> </table>
table的其他属性如cellpadding、cellspacing等html5已不支持,用css代替:cellpadding=0为table,th,td{padding:0};
cellspacing='0'为 table{border-spacing:0;}但要注意ie低版本不支持;
posted @ 2017-12-15 08:54  彩色泡泡  阅读(119)  评论(0编辑  收藏  举报