下面是一个简单的HTML代码示例,用于制作化学元素周期表:
```html
<!DOCTYPE html>
<html>
<head>
<title>化学元素周期表</title>
<style>
table {
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 10px;
}
th {
background-color: #ccc;
}
.metal {
background-color: #e0e0e0;
}
.nonmetal {
background-color: #f8f8f8;
}
</style>
</head>
<body>
<table>
<tr>
<th>元素</th>
<th>符号</th>
<th>原子序数</th>
<th>原子量</th>
<th>分类</th>
</tr>
<tr>
<td>氢</td>
<td>H</td>
<td>1</td>
<td>1.008</td>
<td class="nonmetal">非金属</td>
</tr>
<tr>
<td>氦</td>
<td>He</td>
<td>2</td>
<td>4.0026</td>
<td class="nonmetal">非金属</td>
</tr>
<!-- 添加其它元素的行 -->
</table>
</body>
</html>
4万+

被折叠的 条评论
为什么被折叠?



