0%

HTML5

1、内容可编辑属性

1
2
3
4
5
6
<h2> Earth 616 superheroes </h2> 
<ul class="content-editable" contenteditable="true">
<li> 1. Iron Man</li>
<li> 2. Captain America</li>
<li> 3. Black Panther</li>
</ul>

2、详情标签(Details)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<details>     
<summary>Click here to see more from Earth 616</summary>
<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Location</th>
<th>Job</th>
</tr>
<tr>
<td>1</td>
<td>John Doe</td>
<td>Earth</td>
<td>Human</td>
</tr>
</table>
</details>

3、Datalist 标签

1
2
3
4
5
6
7
8
9
<label for=”superhero”>In case of emergency, which superhero would you call?:</label>
<input list=”superheroes” name=”superhero” id=”superhero”>
<datalist id=”superheroes”>
<option value=”Iron Man”>
<option value=”Captain America”>
<option value=”Black Panther”>
<option value=”Thor”>
<option value=”Spider Man”>
</datalist>

4、Range 属性

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<head>
<script>
function changeValue(event) {
let value = event.target.value;
let output = document.getElementById('output');
output.value = value;
}
</script>
</head>
<body>
<form method="post">
<input
type="range"
name="range"
min="0"
max="100"
step="1"
value=""
onchange="changeValue(event)"/>
</form>
<div class="range">
<output id="output" name="result"> </output>
</div>
</body>

5、Meter 标签

标签定义了定义范围内的标量测量值或分数值

1
2
3
4
<label for="home">Cloud storage</label>
<meter id="home" value="0.4">40%</meter><br>
<label for="root">Internal storage</label>
<meter id="root" value="0.6">60%</meter><br>

6、 Progress 标签

1
2
<label for="home">6/10 tasks done</label>
<progress value="60" max="100" id="home"></progress>

7、标记内容标签

1
<p>Did you know that <mark>not all heroes wear capes.</mark></p>

8、缩写标签(Abbreviation)

1
2
3
4
5
<p>Agent Phil Coulson leads a team of highly skilled agents from the     
global law-enforcement organisation known as
<abbr title="Strategic Homeland Intervention, Enforcement,
and Logistics Division">SHIELD</abbr>.
</p>

9、 and

1
2
3
<p><del>Iron Man</del>
<ins>Captain America</ins>
is ehmmm.. yea the captain!</p>

-------------本文结束感谢您的阅读-------------