day0330
firstHtml.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>双体软件</title>
</head>
<body>
<h1>我的第一个标题</h1>
<p>我的第一个段落</p>
</body>
</html>
代码显示:
tag.html
<!DOCTYPE html>
<html>
<head>
<title>第一节html</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<h1>这是一个一级标题!</h1>
</body>
</html>
代码显示:
h-tag.html
<!DOCTYPE html>
<html>
<head>
<title>h1-h6</title>
<meta charset="utf-8">
</head>
<body>
<h1>一级标题</h1>
<h2>二级标题</h2>
<h3>三级标题</h3>
<h4>四级标题</h4>
<h5>五级标题</h5>
<h6>六级标题</h6>
<p>这是第一段:当你的才华还撑不起你的野心的时候,你就应该静下心来学习;<br />当你的能力还驾驭不了你的目标时,就应该沉下心来,历练;梦想,不是浮躁,而是沉淀和积累,只有拼出来的美丽,没有等出来的辉煌,机会永远是留给最渴望的那个人,学会与内心深处的你对话,问问自己,想要怎样的人生,静心学习,耐心沉淀,送给自己,共勉。
</p>
<hr>
<p>这是第二段</p>
<div>这是第三段</div>
<div>这是第四段</div>
<span>这是第一块span</span><span>这是第二块span</span>
</body>
</html>
代码显示:
font.html
<!DOCTYPE html>
<html>
<head>
<title>文字格式</title>
<meta charset="utf8">
</head>
<body>
<span>普通文字</span>
<b>文字加粗</b>
<br>
<i>斜体</i>
<hr>
<u>下划线</u>
<hr>
<del>删除线</del>
</body>
</html>
代码显示:
media.html
<!DOCTYPE html>
<html>
<head>
<title>多媒体</title>
<meta charset="utf-8">
</head>
<body>
<img src="./img/cat.jpg" alt="这是一张小猫图片" width="300px">
<br>
<img src="img/cat.jpg" alt="这是一张小猫图片" width="300px">
<br>
<img src="./cat.jpg" alt="这是一张小猫图片" width="300px">
<br>
<img src="cat.jpg" alt="这是一张小猫图片" width="300px">
<br>
<img src="../cat.jpg" alt="这是一张小猫图片" width="300px">
<br>
<a href="h-tag.html">同级目录的页面</a>
<a href="https://www.baidu.com/">百度一下,你就知道</a>
<a href="#div">到底部另一个a标签地址</a>
<br>
<img src="C:/Users/Katrina/OneDrive/桌面/html/day0330/img/cat.jpg" alt="这是一张小猫图片">
<br>
<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Finews.gtimg.com%2Fnewsapp_bt%2F0%2F13483532113%2F1000.jpg&refer=http%3A%2F%2Finews.gtimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651200451&t=9b94503ec77ca27eb20b425604410f0a"
alt="这是一个小猫头像">
<br>
<audio src="video/L2_1823111002_宋玉荃.mp3" controls autoplay loop>歌曲凉凉</audio>
<br>
<video src="video/小狗狗.mp4" controls autoplay loop></video>
<br>
<video src="https://vd3.bdstatic.com/mda-jfjudi0a09pvgcn4/hd/mda-jfjudi0a09pvgcn4.mp4" controls autoplay
loop></video>
<br>
<a name="div">这是最底部</a>
</body>
</html>
代码显示:
素材:
day0331
h-tag.html
<!DOCTYPE html>
<html>
<head>
<title>h1-h6</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<span>这是第一块<span></span></span>
<span>这是第二块span</span>
<div>
ssdd sww
www
s
</div>
<pre>
ssdd sww
www
s
</pre>
<ol>
<li>标题</li>
<li>段落</li>
<li>div与span</li>
</ol>
<ul>
<li>标题</li>
<li>段落</li>
<li>媒体</li>
</ul>
<span>这是一段话 中文</span>
<span>第二句</span>
</body>
</html>
代码显示:
tableDemo.html
<!DOCTYPE html>
<html>
<head>
<title>表格示例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<table border="1" cellpadding="20" cellspacing="0">
<tr>
<th>姓名</th>
<th>年龄</th>
<th>证书</th>
<th>评价</th>
</tr>
<tr>
<td>张三</td>
<td>18</td>
<td>四级</td>
<td rowspan="3">优秀</td>
</tr>
<tr>
<td>李四</td>
<td>19</td>
<td>计算机二级</td>
</tr>
<tr>
<td>王五</td>
<td>19</td>
<td>普通话二级</td>
</tr>
<tr>
<td>总结</td>
<td colspan="3">你们都很棒!</td>
</tr>
</table>
</body>
</html>
代码显示:
formDemo.html
<!DOCTYPE html>
<html>
<head>
<title>表单案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<body>
<center>
<form action="">
<h2>欢迎注册</h2>
用户名:<input type=" text">
<br>
<br>
手机号:<input type="text" value="123456">
<br>
<br>
密码: <input type="password" placeholder="输入8位以上数字+字母">
<br>
<br>
<input type="submit">
<input type="reset">
<input type="button" value="取消">
<br>
<br>
<input type="file">
<br>
<br>
<input type="file" multiple>
<br>
<br>
<button type="submit">提交</button>
<button type="reset">重置</button>
<button type="button">自定义</button>
<br>
<br>
性别:<input type="radio" name="sex" checked> 男
<input type="radio" name="sex"> 女
<br>
<br>
爱好:<input type="checkbox" checked> 篮球
<input type="checkbox"> 羽毛球
<input type="checkbox" checked> 乒乓球
<br>
<br>
婚姻情况:<input type="radio" name="isMarried" id="yes"><label for="yes">已婚</label>
<input type="radio" name="isMarried" id="no"><label for="no">离婚</label>
<label><input type="radio" name="isMarried">未婚</label>
<label><input type="radio" name="isMarried">丧偶</label>
<br>
<br>
请选择城市:<select name="" id="">
<option value="">北京</option>
<option value="" selected>上海</option>
<option value="">广州</option>
</select>
<br>
<br>
<textarea name="" id="" cols="10" rows="1"></textarea>
</form>
</center>
</body>
</html>
代码显示:
framset.html
<!DOCTYPE html>
<html>
<head>
<title>frameset框架集</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
</head>
<frameset cols="30%,30%,40%">
<frame src="h-tag.html"></frame>
<frame src="tableDemo.html"></frame>
<frame src="formDemo.html"></frame>
</frameset>
<body>
</body>
</html>
代码显示:
day0404
css1.html
<!DOCTYPE html>
<html>
<head>
<title>CSS案例</title>
<meta http-equiv="Content" content="text/html" charset="utf-8">
<style>
</style>
<link rel="stylesheet" href="css/demo1.css">
</head>
<body>
<p style="color: green;font-size: 30px;">这是一个段落</p>
<div>这是第一个div</div>
<div>这是第二个div</div>
</body>
</html>
代码显示:
css2.html
<!DOCTYPE html>
<html>
<head>
<title>选择器</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.red {
color: red;
}
#forth {
background-color: seagreen;
}
* {
font-weight: bold;
}
</style>
</head>
<body>
<div>这是第一个div</div>
<div class="red">第二个div</div>
<div class="red">第三个div</div>
<div class="red" id="forth">第四个div</div>
<div class="red">第五个div</div>
</body>
</html>
代码显示:
css3.html
<!DOCTYPE html>
<html>
<head>
<title>选择器</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.red {
color: red;
}
#forth {
background-color: seagreen;
}
* {
font-weight: bold;
}
</style>
</head>
<body>
<div>这是第一个div</div>
<div class="red">第二个div</div>
<div class="red">第三个div</div>
<div class="red" id="forth">第四个div</div>
<div class="red">第五个div</div>
</body>
</html>
代码显示:
css4.html
<!DOCTYPE html>
<html>
<head>
<title>Css测试</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
p {
font-weight: bold;
}
.green {
color: green;
}
#yellow {
background-color: yellow;
}
.div {
height: 850px;
background-image: url("img/cat.jpg");
background-repeat: no-repeat;
background-color: gray;
background-position: center;
background-attachment: fixed;
}
</style>
</head>
<body>
<p>第一段</p>
<p class="green">第二段</p>
<p class="green">第三段</p>
<p class="green" id="yellow">第四段</p>
<p class="green">第五段</p>
<div class="div">第一个div</div>
</body>
</html>
代码显示:
selectPlus.html
<!DOCTYPE html>
<html>
<head>
<title>选择器进阶</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.red {
color: red;
}
div p {
color: green;
}
div>span {
background-color: pink;
}
</style>
</head>
<body>
<p class="red">第一段p</p>
<p>第二段无属性</p>
<div>一段div
<p>
div里面的p<br>
<span>div里面的p的span</span>
</p>
<span>div里面的span</span>
</div>
</body>
</html>
代码显示:
css文件夹
demo1.css
div {
background-color: yellow;
color: red;
}
demo2.css
.green {
color: seagreen;
}
#forth {
background-color: skyblue;
}
* {
font-weight: bold;
}
素材
day0406
selectPlus.html
<!DOCTYPE html>
<html>
<head>
<title>选择器进阶</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
p.red {
color: red;
}
</style>
</head>
<body>
<p class="red">这是第一段p</p>
<p>第二段无属性</p>
<span class="red">第一段span</span>
</body>
</html>
代码显示:
test.html
<!DOCTYPE html>
<html>
<head>
<title>CSS案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.div1 {
width: 1100px;
height: 1100px;
color: red;
font-weight: bold;
background-color: yellow;
background-image: url("img/cat.jpg");
background-repeat: no-repeat;
background-position: right bottom;
background-attachment: fixed;
}
div {
font: bold italic 20px 宋体;
text-indent: 2em;
letter-spacing: 5px;
line-height: 2;
}
body {
text-align: center;
}
</style>
</head>
<body>
<h1>标题1</h1>
<div class="div1">一段内容</div>
<div>
当你的才华还撑不起你的野心的时候,你就应该静下心来学习;当你的能力还驾驭不了你的目标时,就应该沉下心来,历练;梦想,不是浮躁,而是沉淀和积累,只有拼出来的美丽,没有等出来的辉煌,机会永远是留给最渴望的那个人,学会与内心深处的你对话,问问自己,想要怎样的人生,静心学习,耐心沉淀,送给自己,共勉。
</div>
<a href="www.baidu.com">百度</a>
<img src="img/cat.jpg">
</body>
</html>
代码显示:
divbox.html
<!DOCTYPE html>
<html>
<head>
<title>div盒子</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
div {
border-color: green;
border-style: dotted;
border-width: 5px;
padding: 5px 10px 15px;
margin: 5px;
width: 200px;
height: 200px;
background-color: grey;
color: white;
}
</style>
</head>
<body>
<div>第一段div</div>
<div>第二段div</div>
</body>
</html>
代码显示:
素材
day0407
displayDemo.html
<!DOCTYPE html>
<html>
<head>
<title>显示模式案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.div1 {
width: 100px;
height: 100px;
background-color: green;
}
p {
width: 100px;
height: 30px;
background-color: blue;
}
span {
width: 80px;
height: 20px;
background-color: orange;
}
input {
width: 40px;
height: 30px;
background-color: green;
}
</style>
</head>
<body>
<div class="div1">123456
<div>儿子div</div>
</div>
<div class="div1">456789</div>
<p>一段</p>
<p>二段</p>
<span>span1</span>
<span>span2</span>
<br>
<input type="text" value="123">
<input type="text" value="456">
</body>
</html>
代码显示:
floatDemo.html
<!DOCTYPE html>
<html>
<head>
<title>浮动案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
#d1 {
width: 150px;
height: 100px;
background-color: green;
float: left;
}
#d2 {
width: 100px;
height: 150px;
background-color: red;
float: left;
}
#d3 {
width: 100px;
height: 150px;
background-color: orange;
float: left;
}
</style>
</head>
<body>
<div class="div1" id="d1">三国杀</div>
<div class="div1" id="d2">扑克牌</div>
<div class="div1" id="d3">狼人杀</div>
</body>
</html>
代码显示:
relativePosition.html
<!DOCTYPE html>
<html>
<head>
<title>位置案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.div1 {
width: 100px;
height: 100px;
}
#d1 {
position: relative;
left: 30px;
right: 30px;
top: 30px;
bottom: 30px;
background-color: red;
}
#d2 {
background-color: green;
}
#father {
width: 300px;
background-color: rgb(245, 135, 10);
}
</style>
</head>
<body>
<div id="father">
<div class="div1" id="d1">三国杀</div>
</div>
<div class="div1" id="d2">扑克牌</div>
</body>
</html>
代码显示:
absolutePosition.html
<!DOCTYPE html>
<html>
<head>
<title>位置案例</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
.div1 {
width: 100px;
height: 100px;
}
#d1 {
position: relative;
background-color: red;
}
#father {
position: relative;
left: 50px;
width: 300px;
height: 200px;
background-color: rgb(245, 135, 10);
}
#d2 {
position: relative;
left: 20px;
float: left;
width: 100px;
height: 50px;
background-color: grey;
}
#d3 {
position: relative;
left: 200px;
float: left;
width: 100px;
height: 50px;
background-color: green;
}
#d4 {
position: relative;
left: 200px;
background-color: red;
}
</style>
</head>
<body>
<div id="father">
<div class="div1" id="d1">三国杀</div>
<div id="d4">三国杀</div>
</div>
<div id="d2">d2</div>
<div id="d3">d3</div>
</body>
</html>
代码显示:
|