网页基本标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>基本标签学习</title>
</head>
<body>
<h1> 一级标签</h1>
<h2>二级标签</h2>
<h3>三级标签</h3>
<h4>四级标签</h4>
<h5>五级标签</h5>
<h6>六级标签</h6>
<p>两只老虎,两只老虎,</p>
<p>跑得快,跑得快,</p>
<p>一只没有眼睛,</p>
<p>一只没有尾巴,</p>
<p>真奇怪!真奇怪!</p>
<hr/>
两只老虎,两只老虎,<br/>
跑得快,跑得快,<br/>
一只没有眼睛,<br/>
一只没有尾巴,<br/>
真奇怪!真奇怪!<br/>
<h1>字体样式标签</h1>
粗体:<strong>i love you</strong><br/>
斜体:<em>i love you</em><br/>
空 格:
空 格
<br/>
>
<br/>
<
<br/>
©版权所有:叶说喜欢你
</body>
</html>
图像标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<img src="../resources/image/1.jpg" alt="笑嘻了" title="笑嘻了" width="480" height="480">
<a href="4.链接标签.html#top">跳转4</a>
</body>
</html>
超链接标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>链接标签学习</title>
</head>
<body>
<a name="top">顶部</a>
<br/>
<a href="1.我的第一个网页.html" target=”_blank“>点击我跳转到页面1</a>
<a href="http://www.baidu.com">点击我跳转到百度</a>
<br/>
<a href="1.我的第一个网页.html">
<img src="../resources/image/1.jpg" alt="笑嘻了" title="笑嘻了" width="480" height="480">
</a>
<a href="#top">回到顶部</a>
<a href="mailto:2775067350@qq.com">点击联系我</a>
</body>
</html>
行内元素和块元素
列表标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>列表学习</title>
</head>
<body>
<ol>
<li>Java</li>
<li>Python</li>
<li>运维</li>
<li>前端</li>
<li>C/C++</li>
</ol>
<hr/>
<ul>
<li>Java</li>
<li>Python</li>
<li>运维</li>
<li>前端</li>
<li>C/C++</li>
</ul>
<dl>
<dt>学科</dt>
<dd>Java</dd>
<dd>Python</dd>
<dd>Llnux</dd>
<dd>C++</dd>
<dt>位置</dt>
<dd> 西安 </dd>
<dd> 杭州 </dd>
<dd> 北京 </dd>
<dd> 上海 </dd>
</dl>
</body>
</html>
表格标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表格标签学习</title>
</head>
<body>
<table border="1px">
<tr>
<td colspan="4">1-1</td>
</tr>
<tr>
<td rowspan="2">2-1</td>
<td>2-2</td>
<td>2-3</td>
<td>2-4</td>
</tr>
<tr>
<td>3-1</td>
<td>3-2</td>
<td>3-3</td>
</tr>
</table>
</body>
</html>
媒体元素标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>媒体元素学习</title>
</head>
<body>
<video src="../resources/videos/..mp4" controls autoplay></video>
<audio src="../resources/audio/...mp3" controls autoplay></audio>
</body>
</html>
页面结构分析
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>页面结构学习</title>
</head>
<body>
<header>
<h2>网页头部</h2>
</header>
<section>
<h2>网页主体</h2>
</section>
<footer>
<h2>网页脚部</h2>
</footer>
</body>
</html>
iframe内联框架
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>内联框架学习</title>
</head>
<body>
<iframe src="http://www.baidu.com"name="hello" frameborder="0" width="1300px" height="1300"></iframe>
<a href="1.我的第一个网页.html" target="#hello">点击跳转</a>
</body>
</html>
表单标签,验证(重要)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录注册</title>
</head>
<body>
<h1>注册</h1>
<form action="1.我的第一个网页.html" method="get">
<p>名字:<input type="text" name="username" placeholder="请输入用户名" required></p>
<p>密码:<input type="password" name="pwd"></p>
<p>
性别 :
<input type="radio" value="boy" name="sex"/>男
<input type="radio" value="girl" name="sex"/>女
</p>
<p>爱好:
<input type="checkbox" value="sleep" name="hobby">睡觉
<input type="checkbox" value="code" name="hobby" checked>代码
<input type="checkbox" value="chat" name="hobby">聊天
<input type="checkbox" value="game" name="hobby">游戏
</p>
<p>按钮:
<input type="button" name="btn1" value="点击变长">
<input type="image" src="../resources/image/1.jpg">
</p>
<p>国家:
<select name="列表名称">
<option value="china">中国</option>
<option value="usa">美国</option>
<option value="eth" selected>瑞士</option>
<option value="indien">印度</option>
</select>
</p>
<p>反馈:
<textarea name="textarea"cols="30" rows="10">文本内容</textarea>
</p>
<p>
<input type="file" name="files">
<input type="button" name="upload" value="上传" >
</p>
<p> 邮箱
<input type="email" name="email">
</p>
<p> URL
<input type="url" name="url">
</p>
<p> 商品数量
<input type="number" name="number" max="100" min="0" step="10">
</p>
<p>音量:
<input type="range" name=" voice" min="0" max="100">
</p>
<p>搜索:
<input type="search" name="search">
</p>
<p>
<label for="mark">你点我试试</label>
<input type="text" id="mark">
</p>
<p>自定义邮箱:
<input type="text" name="diymail" pattern="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$">
</p>
<p>
<input type="submit" disabled>
<input type="reset" hidden>
</p>
</form>
</body>
</html>