html商品网页代码
时间: 2023-11-08 07:52:58 浏览: 43
以下是一个简单的HTML商品网页代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>商品网页</title>
<style>
.product {
display: inline-block;
width: 300px;
padding: 20px;
border: 1px solid #ccc;
margin: 10px;
}
.product img {
width: 100%;
height: auto;
}
.product h3 {
margin-top: 10px;
}
.product p {
margin-top: 5px;
}
</style>
</head>
<body>
<div class="product">
<img src="product1.jpg" alt="Product 1">
<h3>商品名称1</h3>
<p>商品描述1</p>
<p>价格:$10.99</p>
</div>
<div class="product">
<img src="product2.jpg" alt="Product 2">
<h3>商品名称2</h3>
<p>商品描述2</p>
<p>价格:$15.99</p>
</div>
<div class="product">
<img src="product3.jpg" alt="Product 3">
<h3>商品名称3</h3>
<p>商品描述3</p>
<p>价格:$20.99</p>
</div>
</body>
</html>
```