markup
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>示例页面</title>
<style>
body {
background: #f5f5f5;
font-family: "Microsoft YaHei", sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.box {
background: #fff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
h1 {
color: #333;
}
p {
color: #666;
}
button {
padding: 10px 20px;
border: none;
background: #2563eb;
color: white;
border-radius: 6px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="box">
<h1>你好 HTML</h1>
<p>这是一段随便写的网页代码示例</p>
<button onclick="alert('点击成功啦')">点我试试</button>
</div>
<script>
console.log("网页加载完成");
</script>
</body>
</html>