页面设计用到的语言
HTML:超文本标记语言
一、head区域常用标签
<base>
使用后浏览器不再使用当前文档的URL,而使用指定的URL来解析所有的相对URL。其中包括<a>,<img>,<link>,<form>中的URL
<title>
<meta>
<meta charset = "UTF-8">:指定编码模式
<meta name = "viewport" content="...">:设置可视区域、缩放级别等
<meta hettp-equiv = "..." content = "...">:设置浏览器兼容性模式
<link>
<script>
<style>
二、body区域常用标签
1.标题标签
<h1></h1>
2.字体标签
<b></b>,<strong></strong>
<sup></sup>
<sub></sub>
<s></s>
<u></u>
<i></i>,<em></em>
<code></code>
<cite></cite>
3.格式化标签
<p></p>
<br />
<hr />
<pre></pre>
<div>区块
<div style="margin-top:1000px"></div>
4.链接标签
<a></a>
<a href = "...">...</a>:在同一页面跳转
<a href = "..." target = "_blank">...</a>:在新页面跳转
其中,href = "..."被称为属性attribute,属性名称为href
5.注释标签
<!-- -->
6.list标签
<ul></ul>,<ol></ol>
<ul> <li>...</li> </ul>
<ol> <li>...</li> </ol>
快捷创建:
回车
7.table标签
<table></table>
8.form标签
<form></form>
action可以被指向一个文件,来处理后续的逻辑问题
method是提交方式
9.button标签
<button></button>
<button>This is a Button</button>
10.image标签
<img>
<img style="width:100vw" src="img/pic.jpg" alt="This is a img tag">
src:图像源地址
alt:当因某些原因图像无法正常显示时,显示alt内容
style="width:100vw":占100%的浏览器宽度
11.注释标签:<abbr></abbr>
<p><abbr title="Massachusetts Institute of Technology">MIT</abbr> is a prestigious college</p>
12.input标签
输入框
<input type = "text" name = "userName">
<input type = "password" name = "userPwd">
三、元素分类
a.块级元素
1.在页面内以块的形式展现
2.出现在新的一行
3.占全部宽度
如:<div>,<h1>-<h6>,<p>,<ul>,<ol>