# 一级标题相当于h1
## 二级标题
### 三级标题
#### 四级标题
1.单行: const div = document.querySelector('.box')
namespace core;
class Demo
{
...
}
id | name | salary | |
---|---|---|---|
1 | 王老师 | zls@qq.com | 12344 |
2 | 李老师 | zlss@qq.com | 1222 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- 1.id,class -->
<!-- h1:标签/元素 -->
<!-- id,clas:属性, -->
<h1>hello world</h1>
<!-- id用#表示,class用.表示,内容用{}包含 -->
<!-- #box{box} -->
<div id="box">box</div>
<!-- .content{content} -->
<div class="content">content</div>
<!-- 2.层级:父子,兄弟 -->
<!-- ul>li*3 -->
<ul>
<li><a href="">首页</a></li>
<li><a href="">教程</a></li>
<li><a href="">社区</a></li>
</ul>
<!-- 3.重复生成 -->
<!-- ul>li*3>a{首页} -->
<ul>
<li><a href="">首页</a></li>
<li><a href="">首页</a></li>
<li><a href="">首页</a></li>
</ul>
<!-- 4.序号:@ $ -->
<!-- ul.menu>li.item*4>a{item$} -->
<ul class="menu">
<li class="item"><a href="">item1</a></li>
<li class="item"><a href="">item2</a></li>
<li class="item"><a href="">item3</a></li>
<li class="item"><a href="">item4</a></li>
</ul>
<!-- ul.menu>li.item*4>a{item$@5} -->
<!-- @:指定起始索引 -->
<ul class="menu">
<li class="item"><a href="">item5</a></li>
<li class="item"><a href="">item6</a></li>
<li class="item"><a href="">item7</a></li>
<li class="item"><a href="">item8</a></li>
</ul>
<!-- ul.menu>li.item*4>a{item$@-5} -->
<!-- 反序开始 -->
<ul class="menu">
<li class="item"><a href="">item8</a></li>
<li class="item"><a href="">item7</a></li>
<li class="item"><a href="">item6</a></li>
<li class="item"><a href="">item5</a></li>
</ul>
<!-- 快速创建5行8列的表格 -->
<!-- table>caption{学生信息表}+(thead>tr>th{title}*8)+(tbody>tr*5>td{item}*8) -->
<table>
<caption>学生信息表</caption>
<thead>
<tr>
<th>title</th>
<th>title</th>
<th>title</th>
<th>title</th>
<th>title</th>
<th>title</th>
<th>title</th>
<th>title</th>
</tr>
</thead>
<tbody>
<tr>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
</tr>
<tr>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
</tr>
<tr>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
</tr>
<tr>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
</tr>
<tr>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
<td>item</td>
</tr>
</tbody>
</table>
</body>
</html>