初始HTML
什么是HTML
-
HTML :
- Hyper Text Markup Language(超文本标记语言)
-
发展史
网页基本标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="狂神说java">
<meta name="description" content="来这个地方可以学医java">
<title>我的第一个网页</title>
</head>
<h1>一级标签</h1>
<h2>二级标签</h2>
<h3>三级标签</h3>
<h4>四级标签</h4>
<h5>五级标签</h5>
<h6>六级标签</h6>
<p>两只老虎,两只老虎,</p>
<p>跑得快,跑得快,</p>
<p>一只没有眼睛</p>
<p>一只没有尾巴,</p>
<p>真奇怪!真奇怪!</p>
<p>两只老虎,两只老虎</p>
<p>跑得快,跑得快,</p>
<p>一只没有耳朵,</p>
<p>一只没有尾巴,</p>
<p>真奇怪!真奇怪!</p>
两只老虎,两只老虎,<br/>
跑得快,跑得快,<br/>
一只没有眼睛,<br/>
一只没有尾巴,<br/>
真奇怪!真奇怪!<br/>
两只老虎,两只老虎,<br/>
跑得快,跑得快,<br/>
一只没有耳朵,<br/>
一只没有尾巴,<br/>
真奇怪!真奇怪!<br/>
<hr/>
<h1>字体样式标签</h1>
粗体:<strong>I love you</strong>
斜体:<em>I love you</em>
空 格
<hr>
空 格
<hr>
>大于号
<hr>
<小于号
<hr>
©版权所有
<body>
</body>
</html>
图像,超链接,网页布局
图像标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>图像标签学习</title>
</head>
<body>
<img src="../resource/image/1.jpg" alt="我的头像" title="悬停文字" width="300" height="300">
</body>
</html>
链接标签
超链接
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>链接标签学习</title>
</head>
<body>
<a name="top">top</a>
<a href="1.我的第一个网页.html" target="_blank">点击我跳转页面一</a>
<a href="https://www.baidu.com" target="_self">点击我跳转百度</a>
<br>
<a href="1.我的第一个网页.html">
<img src="../resource/image/1.jpg" alt="我的头像" title="悬停文字" width="300" height="300">
</a>
<a href="#top">回到顶部</a>
<a name="down">down</a>
<a href="mailto:2969300510@qq.com">点击联系我</a>
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2969300510&site=qq&menu=yes">
<img border="0" src="http://wpa.qq.com/pa?p=2:2969300510:53" alt="你好,加我领取小电影" title="你好,加我领取小电影"/></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>linux</li>
<li>c/c++</li>
</ol>
<hr>
<ul>
<li>java</li>
<li>python</li>
<li>linux</li>
<li>c/c++</li>
</ul>
<hr>
<dl>
<dt>学科</dt>
<dd>java</dd>
<dd>python</dd>
<dd>c/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="1">
<tr>
<td colspan="3" >学生成绩</td>
</tr>
<tr>
<td rowspan="2">狂神</td>
<td>语文</td>
<td>100</td>
</tr>
<tr>
<td>数学</td>
<td>100</td>
</tr>
<tr>
<td rowspan="2">秦疆</td>
<td>语文</td>
<td>100</td>
</tr>
<tr>
<td>数学</td>
<td>100</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>媒体元素学习</title>
</head>
<body>
<video src="../resource/video/000VUZPelx07tcVSxHdS01041202ziZn0E010.mp4" controls autoplay></video>
<audio src="../resource/audio/偏爱-张芸京.mp3" controls autoplay></audio>
<audio src="../resource/audio/桥边姑娘%20-%20海伦.flac" controls autoplay ></audio>
</body>
</html>
表单及表单应用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
</head>
<body>
<form action="1.我的第一个网页.html" method="post">
<p>
名字:<input type="text" name="username">
</p>
<p>
密码:<input type="password" name="password">
</p>
<p>
<input type="submit">
<input type="reset" >
</p>
</form>
</body>
</html>
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
</head>
<body>
<form action="1.我的第一个网页.html" method="post">
<p>
名字:<input type="text" name="username" maxlength="8" placeholder="请输入名字" required>
</p>
<p>
密码:<input type="password" name="password" hidden required>
</p>
<p>性别:
<input type="radio" value="boy" name="sex" checked disabled>男
<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="../resource/image/1.jpg">
</p>
<p>国家:
<select name="列表名称" >
<option value="china">中国</option>
<option value="us" selected>美国</option>
<option value="eth">瑞士</option>
</select>
</p>
<p>
<textarea name="textarea" cols="30" rows="10">文本内容</textarea>
</p>
<p>
<input type="file" name="files">
<input type="button" value="上传" name="upload">
</p>
<p>邮箱:
<input type="email" name="email" required>
</p>
<p>自定义邮箱
<input type="text" name="diyemail" pattern=^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$">
</p>
<p>URL:
<input type="url" name="url" required>
</p>
<p>商品数量:
<input type="number" name="number" max="100" min="1" step="1">
</p>
<p>音量:
<input type="range" name="voice" max="100" min="0" step="1">
</p>
<p>搜索:
<input type="search" name="search">
</p>
<p>
<label for="mark">你点我试试</label>
<input type="text" id="mark">
</p>
<p>
<input type="submit">
<input type="reset" >
</p>
</form>
</body>
</html>
表单初级验证
作者:little-cheap
出处:http://www.cnblogs.com/little-cheap/
-------------------------------------------
个性签名:独学而无友,则孤陋而寡闻。做一个灵魂有趣的人!
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
万水千山总是情,打赏一分行不行,所以如果你心情还比较高兴,也是可以扫码打赏博主,哈哈哈(っ•̀ω•́)っ✎⁾⁾!
来源:https://www.cnblogs.com/little-cheap/p/15317888.html |