以下是一个简单的HTML代码片段,将网页内容区域最大宽度设置为800像素,并使用viewport元标记适配手机屏幕:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Website</title>
<style>
body {
max-width: 800px;
margin: auto;
}
</style>
</head>
<body>
<h1>Welcome to my website!</h1>
<p>Here is some content.</p>
</body>
</html>
```
在上述代码中,我们将网页内容区域的最大宽度设置为800像素,并通过margin:auto属性将内容居中。viewport元标记中的width=device-width属性设置了网页的宽度与设备屏幕宽度相同,适配手机屏幕。