批改状态:合格
                        老师批语:
                    
                            问答题
1. 学习PHP为什么必须要掌握HTML?
答:因为php程序的运行结果就是html,所以要学好html。php就是用来动态生成html代码的,前端开发主要是静态页面的编写,其中主要用到是工具为:HTML,CSS,JavaScript,后端是指服务器,主要运行在服务器环境中。前端的html代码由浏览器负责解析并执行,后端代码如php由服务器上特殊的程序来运行。
2.为什么选择PHP开发动态网站?
答:因为php能够上手快,开发快,更新快,迭代快。对于个人php让人学起来比较快,对于公司来说用php开发的项目开发速度比较快而php本身的迭代更新速度也很快,所以会选择php开发动态网站
代码:
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
	table {		
		width: 700px;
		text-align: center;
		margin: 10px auto;
		border-collapse: collapse; 
	}
	table caption {
		font-size: 20px;
		font-weight: bolder;
		color: #000;
		margin-bottom: 20px;
	}
	table, th, td {
		border: 1px solid #ccc;
		
	}
	
	table tr:first-child {
		background-color:lightblue;
	}
	table tr td img {
		padding: 5px;
	}
	table tr td a {
		padding:5px;
		color:black;
		
	}
	
</head>
</style>
<body>
	<table>
		<caption><h2>库存清单</h2></caption>
		<tr>
			<th>编号</th>
			<th>类型</th>
			<th>分类</th>
			<th>代表图</th>
			<th>总计库存</th>
			<th>分析</th>
			<th>分项库存详情</th>
		</tr>
		<tr>
			<td>1</td>
			<td>家用电器</td>
			<td>
				<ul>
					<li>生活电器</li>
					<li>厨房电器</li>
					<li>影音电器</li>
				</ul>
			
			</td>
			<td><img src="4.jpg" width="100"></td>
			<td>5000台</td>
			<td>
				<p>1、出入库情况盘仓亏损情况</p>
				<p>2、根据出入库了解进出库量</p>
			</td>
			<td><a href="#">查看详情</a></td>
		</tr>
		<tr>
			<td>2</td>
			<td>服饰</td>
			<td>
				<ul>
					<li>男服</li>
					<li>女服</li>
				</ul>
			</td>
			<td><img src="2.jpg" width="100"></td>
			<td>1200件</td>
			<td>
				<p>1、出入库情况盘仓亏损情况</p>
				<p>2、根据出入库了解进出库量</p>
			</td>
			<td><a href="#">查看详情</a></td>
		</tr>
		<tr>
			<td>3</td>
			<td>家居用品</td>
			<td>
				<ul>
					<li>家具</li>
					<li>家饰</li>
				</ul>
			</td>
			<td><img src="3.jpg" width="100"></td>
			<td>3000件</td>
			<td>
				<p>1、出入库情况盘仓亏损情况</p>
				<p>2、根据出入库了解进出库量</p>
			</td>
			<td><a href="#">查看详情</a></td>
		</tr>
	</table>
</body>
</html>点击 "运行实例" 按钮查看在线实例
预览图:
总结:
1、知道了php是用来生成动态html代码的
2、知道了php为什么会在当下这么流行,主要是因为php让人学起来比较快,对于公司来说用php开发的项目开发速度比较快而php本身的迭代更新速度也很快,所以会流行
3、掌握基本的table表格和ul li的应用
                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号