day 20 summary

day 20 summary

网页基本结构:

整个网页是一个html标签. (有多少个网页就有多少个html标签,就有多少个html文件)
一个html标签里面有一个head标签和一个body标签
head负责网页头部的显示
body负责网页内容的显示

html表示整个网页

	<link rel="icon" type="image/png" href="./img/file:///E:/python 2103 training/day1-前端基础/img/F~Y2(2~%25(NIN7_RO6L%60F0)V.png.png"/>
	<!-- 1.标题:h1~h6 -->
	你好,世界!
	<h1>一级标题</h1>
	<h2>二级标题</h2>
	<h3>三级标题</h3>
	<h4>四级标题</h4>
	<h5>五级标题</h5>
	<h6>六级标题</h6>

!-- 2.段落-自然段:p
一个段落一个p标签
–>

	 <p>“杂交水稻之父”、“共和国勋章”获得者袁隆平,于22日13时07分在长沙逝世,享年91岁。</p>
	 <p>遗体送别仪式24日</p>
<span>遗体送别仪式24日</span>
<span>“共和国勋章”</span>
<span>获得者袁隆平</span>
	<a href="https://www.baidu.com/s?ie=UTF-8&wd=%E6%B7%98%E5%AE%9D">百度</a><br>
	<a href="https://www.baidu.com/s?ie=UTF-8&wd=%E5%9B%BE%E7%89%87" target="_blank">百度</a><br>
	<!-- 表单标签是用来对表单中国所有相关标签进行重置和提交,单独使用没有任何价值 
	-->
	<form action="" method="">
	</form>


​ <!-- 2.1 input标签
​ type属性 -值不同,标签的表现和作业完全不同

普通文本输入框:

	 普通按钮:<input type="button"  value ="确定"><br><br>


	<!-- 
	 单选按钮需要通过lable标签来提供选项,当label的for和input的ID一致的时候,点击label可以选中input
	 如果希望多个选项中有且只有一个选项处于选中的状态,需要将多个选项的name属性设置成相同的值
	 
	 -->
	 
	 单选按钮:<input type="radio"  value ="男" id="sex1" name="sex"checked="checked" /><label for="set1"></laber/><br><br>h
			 <input type="radio"  value ="女" id="sex2" name="sex"/><label for="set2"></label/><br><br>

	 复选按钮:<input type="checkbox"id="ball1" name ="ball"/><label for="ball1">篮球"</label>
			 <input type="checkbox"id="ball2" name ="ball"/><label for="ball2">足球"</label>
			 <input type="checkbox"id="ball3" name ="ball"/><label for="ball3">排球"</label>
			 <input type="checkbox"id="ball4" name ="ball"/><label for="ball4">羽毛球"</label><br><br>
			  
	 <!-- 重置按钮只能重置和重置按钮在同一个form标签里面的内容 -->
	 重置按钮:<input type="reset"  value="还原"/><br><br>
	 	h
	 </form>

	 颜色选择器:<input type="color"/><br><br>
	 文件选择<input type="file"/><br>
	 
	时间选择器:<input type="datetime-local"/><br><br>
	日期选择器:<input type="date"/><br><br>
	<textarea rows="" cols=""placeholder="请输入类容">小明</textarea>
	<!-- 2.下拉列表 -->
	<select name="city">
		<option value="成都市">成都市</option>
		<option value ="乐山">乐山</option>
		<option value ="西昌">西昌</option>
		<option value ="眉山">眉山</option>
	</select>
	
	<!-- 2.列表 -->
	<!-- 1)有序列表 -->
	<ol>
		<li>python</li>
		<li>java</li>
		<li>H5</li>
		<li>物联网</li>
		<li>ui</li>
	</ol>
	
	<!-- 2)无序列表 -->
	<ul>
		<li>python</li>
		<li>java</li>
		<li>H5</li>
		<li>物联网</li>
		<li>ui</li>	
	</ul>
	
	<!-- 3.div标签 -->

搜狐主题爬取

import requests
import re
response = requests.get('https://www.sohu.com/')
response.encoding = 'utf-8'
html = response.text
getTitles = re.compile(r'''<a.*?href="(.*?)".*?title=["'](.*?)["'].*?>''')
titleList = re.findall(getTitles,html)
for title in titleList:
    print(title)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值