1. html
1. 中文乱码:里面添加
<meta charset="utf-8">
常用编码:gb2312 只能识别简体中文 —> gbk 可以识别繁体
unicode 万国码
utf-8 是unicode升级版
总之就用utf-8就完事了
2. title标签
<title>这是浏览器标签</title>
3. html lang
<html lang="en, zh"> 告诉搜索引擎爬虫我们的网站是关于什么内容的
meta seo优化
<meta content="服装", name="keywords">
<meta content="这是一个你穿了就不想脱的衣服", name="description">
4. 常见标签
<p>aaaaaa</p> p 段落标签
<h1></h1> h1-h6 标题标签
<strong></strong> 加粗
<em></em> 倾斜 这两个可以嵌套
<del>¥50.00</del> 删除线标签
<address>sssss</address> 地址标签,不常用,可以用p+em模拟实现
<div></div>
<span></span> 这两个没什么具体作用,充当容器,分块
如果你单独操作元素,那可能要操作多个,但是直接操作容器的话,就方便很多
2. html高级标签
空格只用来分割字符,不代表”空格”这个文本,写多少个空格都只显示一个空格
空格
< > 代表 <>, less than, great than
<br> 会车 换行
<ol> 有序列表 不常用
<li></li>
<li></li>
<li></li>
<li></li>
</ol>
<ol type="1/a/A/i/I"> 按什么排序,1默认,按数字排序,i代表罗马数字
<ol reversed="reversed"> 倒序排序
<ol type="A" start="2"> 第一项开始的序号,不受前面的type类型影响
<ul> 无序列表
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<ul type="disc/square/circle"> discircle实心圆/实心方块/空心圈
3. img标签
<img src="">
src : 1.网上url/2.本地绝对或相对路径
<img src="" alt="" title="">
4. a标签
1. 超链接
<a href="http://www.baidu.com">百度</a>
a标签里面也可以放<img>标签
<a href="http://www.baidu.com" target="_blank"></a>
target="_self"
2. 锚点
锚增加一个定点位置(#{id})
<div id="demo1" style="width: 100px;height: 100px;background-color: red">demo 1</div>
<div id="demo2" style="width: 100px;height: 100px;background-color: green">demo 2</div>
<a href="#demo1">find demo1</a>
<a href="#demo2">find demo2</a>
3. 打电话、邮件
<a href="tel:17812344321">联系我们</a>
mailto="邮箱"
4. 协议限定符
<a href="javascript:while(1) {alert('乱点什么')}">点我试试</a>
效果就是无限弹出对话框
5. form标签 向后端发送数据
<form method="get/post" action="http://www.baidu.com/123.php">
<p>
username: <input type="text" name="username">
</p>
<p>
password: <input type="password" name="password">
</p>
<p>
<input type="submit" name="">
</p>
</form>
file:///Users/sty/Documents/html:css/lesson1.html?username=sss&password=sss
单选框
喜欢的明星:
贝克汉姆<input type="radio" name="star" value="beikehanmu">
莱昂纳多<input type="radio" name="star" value="laiangnaduo">
哈哈哈<input type="radio" name="star" value="hahaha">
name值设为一样的