day01 html 与 css 的含义 + 常用标签 + 常用样式

html 与 css 的含义

html: 网页的结构(标签)
css : 对标签进行修饰

html语法结构


   编码转换形式支持中文显示
  
  里面写css修饰语法;


里面写标签;

常用标签

1 div: 盒子(容器)
2 h1~h6: 标题
3 a: 超链接
4 p: 段落
5 img: 图片
6 input: 输入框
7 button: 按钮
8 ul,li: 不排序列表
9 dl,dt,dd: 定义列表

css修饰语法


css常用样式

color(颜色), height(高), width(宽), text-align(文本水平方向位置), line-height(行高), margin(外部位置), 
padding(外部填充),  border(边框), background(背景), *{margin:0;padding:0}(清除默认的样式);

常用选择器以级优先级

1 标签名选择 例如: 段落

hello world

p{.......}
2 class类选择 例如:  

hello world

.one{.......} 以及.two{.......}
3 id选择 例如:  

hello world

#id{.......}
4 伪类选择 例如:  

hello world

p:hover{.......} (响应事件效果)
总结: 选择器优先级为 (!important> id > class > 标签 )
常用class定义标签名称!!!

你可能感兴趣的:(day01 html 与 css 的含义 + 常用标签 + 常用样式)