在学习php之前 我们还得先了解浏览器可以识别的编程语言,html,css以及js(前端)
在浏览器所呈现的内容,布局,动态效果(轮播图)都是由前端实现的
我们先在浏览器打开一个网站,我这边打开的是https://www.w3school.com.cn/html/index.asp
鼠标右击后选择查看源码
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- 引用js和使用js -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-878633-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-878633-1');
</script>
<title>w3school 在线教程</title>
<!-- 引用css -->
<link rel="stylesheet" type="text/css" href="/c5.css" />
<meta charset="gbk" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="description" content="全球最大的中文 Web 技术教程。" />
<meta name="robots" content="all" />
<meta name="author" content="w3school.com.cn" />
<meta name="Copyright" content="Copyright W3school.com.cn All Rights Reserved." />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta http-equiv="imagetoolbar" content="false" />
<link rel="icon" type="image/png" sizes="16x16" href="/ui2019/logo-16-red.png">
</head>
<body id="homefirst">
<div id="wrapper">
<div id="header_index">
<h1><a href="/index.html" title="w3school 在线教程" style="float:left;">w3school 在线教程</a></h1>
<div id="searchui">
<form method="get" id="searchform" action="https://www.google.com.hk/search">
<input type="hidden" name="sitesearch" value="w3school.com.cn" />
<input type="text" name="as_q" class="box" id="searched_content" title="在此输入搜索内容。" />
<input type="submit" value="Go" class="button" title="搜索!" />
</form>
</div>
</div>
.......................................
<div id="footer">
<p id="p1">
W3School 简体中文版提供的内容仅用于培训和测试,不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关。
</p>
<p id="p2">
<a href="/about/about_use.asp" title="关于使用">使用条款</a>和<a href="/about/about_privacy.asp"
title="关于隐私">隐私条款</a>。版权所有,保留一切权利。
赞助商:<a target="_blank" href="https://www.ykinvestment.com/" title="上海赢科投资有限公司">上海赢科投资有限公司</a>。
<a target="_blank" href="https://www.miitbeian.gov.cn/">蒙ICP备06004630号</a>
<a style="color: #000; margin-left: 20px;" href="/ad.html" target="_blank" title="W3School 广告刊例">广告刊例</a>
</p>
</div>
</div>
</body>
</html>
在这个源文件我们可以看出 一个基本的页面是由html,css,js组成的,其中css,js嵌套在html中的。
由于此教程的 重点在php,这里不在多多介绍php。如有兴趣,请移步https://www.w3school.com.cn/html/index.asp
网友评论