批改状态:合格
                        老师批语:缺少手写代码!
                    
                            今天主要是学习了php和html的关系,以及table,tr,td,ul,li等标签的使用,
第一个问题:学习PHP为什么还要学习HTML?
前端开发主要是指静态页面的编写,主要用到三个工
具:HTML,CSS,javaScript
超文本标记语言HTML是为了“网页创建和其他可在网页浏览器中看到
的信息”设计的一种标记语言,我们浏览的网页都是由html和css组
成的,PHP就是用来动态生成HTML代码的。因为php程序的运行结果就
是html,所以要学好html;如果我们不学好html和css到后面学习网页
开发的话一些前端的知识会影响我们理解php,所以在学习php之前要
先学习html,
后端主要是服务器端,运行在服务器环境中,前端html代码,由浏览器
负责解释并执行;后端代码,例如php,由服务器上的特殊程序来运行;
所以学习前端知识是为了更好的学习php。
第二个:为什么选择php?
因为 php是世界上最好的语言。
开源 免费 代码多 会的人多。PHP的优势:
良好的安全性,跨平台特性,执行速度快, 效率高,降低网站开发成本,支持面向对象,功能强大,php流行的原因,就一个字:快,上手快,开发快,更新快,迭代快
作业代码:
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>作业</title>
	<style>
	table{
		width:700px;
		margin:20px auto;
		text-align: center;
		border-collapse: collapse;
	}
	table caption{
		font-size: 3em;
		color:#ccc;
		font-weight: bolder;
		margin-bottom: 20px;
	}
	table,th,td{
		border:1px solid #666;
	}
	table tr:first-child{
		background-color: grey;
	}
	table tr:hover{
		background-color: lightgreen;
	}
	table img{
		border-radius:10px;
	}
	table tr td a{
		text-decoration-line: none;
		width: 150px;
		height: 40px;
		border:1px solid black;
		background-color: white;
		border-radius: 8px;
		color:black;
	}
	table tr td a:hover{
		background-color: black;
		color:white;
	}
	</style>
</head>
<body>
<p>欢迎来带电子购物商城</p>
<ul>
	<li>电脑</li>
	<li>手机</li>
	<li>平板</li>
</ul>
<hr>
	<table>
		<caption>购物清单</caption>
		<tr>
			<th>编号</th>
			<th>牌子</th>
			<th>缩略图</th>
			<th>名字</th>
			<th>数量</th>
			<th>操作</th>
		</tr>
		<tr>
			<td>1</td>
			<td>电脑</td>
			<td>联想</td>
			<td>1台</td>
			<td><img src="images/lx.jpg" alt=""></td>
			<td><a href="http://www.taobao.com">点击</a></td>
		</tr>
		<tr>
			<td>2</td>
			<td>手机</td>
			<td>小米</td>
			<td>1台</td>
			<td><img src="images/xm.jpg" alt=""></td>
			<td><a href="http://www.taobao.com">点击</a></td>
		</tr>
		<tr>
			<td>3</td>
			<td>平板</td>
			<td>apple</td>
			<td>1台</td>
			<td><img src="images/pg.jpg" alt=""></td>
			<td><a href="http://www.taobao.com">点击</a></td>
		</tr>
	</table>
</body>
</html>点击 "运行实例" 按钮查看在线实例

                Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号