前端介绍
html + css + JavaScript
- html:前端页面的骨架。
- css:前端页面美化。
- JavaScript:操作html实现各种行为。
html
win + v 启动windows粘贴板 *******************
标签介绍
(只要记住有两种类型即可,见多了就知道啦)
<!DOCTYPE html>
<html lang="en">//②
<head>//②
<meta charset="UTF-8">//①
<meta name="viewport" content="width=device-width, initial-scale=1.0">//①
<title>Document</title>//②
</head>
<style>//②
</style>
<body>//②
<div class="main">//②
<div class="wrapper">
<img class="index" src="./images/index_01.gif" />①
</div>
<div class="footer"></div>//②
</div>
</div>
</body>
</html>
标签有两种类型
- 单标签:如上代码标注①
- 双标签:如上代码块标准②(一般双标签是因为需要展示文字或其他内容)
标签属性
常用:a标签 的href 超链接跳转地址
img 标签 src 图片地址
(高内聚低耦合)*****************
control+/ 注释 ***************
标签介绍
-
标题(Heading)是通过
<h1> - <h6>等标签进行定义的。 -
<hr />标签在 HTML 页面中创建水平线。 -
<br />换行
css 介绍
引入方式
CSS 引入 HTML 的三种方式_css文件怎么引入html文件-CSDN博客
- 行内引入 : 写在标签内
- 内部引入 : 写在 style 标签内
- 外部引入 : 引入.css 文件
选择器
简单选择器
根据名称、id、类来选取元素