博主信息
博文 5
粉丝 0
评论 1
访问量 4117
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
PHP与HTML的关系,制作表格-2018.8.14
圈圈小竹子的博客
原创
901人浏览过
  1. 学习PHP为什么必须要掌握HTML?

    答:前端HTML代码,由浏览器负责解释并执行;

    后端代码,例如php,由服务器上的特殊程序来运行

  2. 为什么选择PHP开发动态网站?

    答:快,上手快,开发快,更新快,迭代快



  3. 实例

    <style type="text/css">
    	table {		
    		border-collapse: collapse; /*折叠表格线*/
    		width: 700px;
    		text-align: center;
    		margin: 20px auto;
    	}
    	table caption {
    		font-size: 2rem;
    		font-weight: bolder;
    		color: #666;
    		margin-bottom: 20px;
    	}
    	table, th, td {
    		border: 1px solid #666;
    		
    	}
    	
    
    	table tr:first-child {
    		background-color: lightgreen;
    	}
    
    	table tr:hover {
    		background-color: #efefef;
    		color: coral;
    	}
    
    	table tr td img {
    		padding: 5px;
    		border-radius: 10px;
    	}
    
    	table tr td a {
    		text-decoration: none;
    		width:140px;
    		height:40px;
    		padding:5px;
    		border:1px solid black;
    		background: white;
    		color:black;
    		border-radius: 8px;
    	}
    
    	table tr td a:hover {
    		background: black;
    		color:white;
    	}
    
    </style>
    
    <table>
    	<caption>购物车</caption>
    	<tr>
    		<th>序列</th>
    		<th>名称</th>
    		<th>品类</th>
    		<th>数量</th>
    		<th>约略图</th>
    		<th>BUY</th>
    	</tr>
    	<tr>
    		<td>1</td>
    		<td>手机</td>
    		<td>三星</td>
    		<td>1台</td>
    		<td><img src="images/phone.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    	<tr>
    		<td>2</td>
    		<td>电视</td>
    		<td>小米</td>
    		<td>1台</td>
    		<td><img src="images/tv.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    	<tr>
    		<td>3</td>
    		<td>电脑</td>
    		<td>戴尔</td>
    		<td>1台</td>
    		<td><img src="images/pc.jpg" width="100"></td>
    		<td><a href="http://taobao.com">点击BUY</a></td>
    	</tr>
    </table>

    运行实例 »

    点击 "运行实例" 按钮查看在线实例

总结:

前端HTML代码,由浏览器负责解释并执行;

后端代码,例如php,由服务器上的特殊程序来运行

php优势:快,上手快,开发快,更新快,迭代快


批改状态:未批改

老师批语:
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

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

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学