3.12-2 html

列表标签

一、有序列表

ol ordery lists (简写:ol)

代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>列表标签</title>

</head>

<body>

<ol type="">男

<li> 跑车</li>

<li>手表</li>

</ol>

<ol>女

<li>服装</li>

<li>化妆品</li>

</ol>

</body>

</html>

排序:

案例:

(2)快速生成有序列表

ol*3>li*2

代码:

二、无序列表

ul unordery lists (简写:ul)

代码

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>列表标签</title>

</head>

<body>

<ul type=>男

<li>车</li>

<li>房</li>

<li>钞票</li>

</ul>

<ul>女

<li>服装</li>

<li>化妆品</li>

<li>手饰</li>

</ul>

</html>

案例:

(2)快速生成无序列表

ul*2>li*3 按tab键联想

代码: ul*2>li*3

列表标签

一、有序列表

ol ordery lists (简写:ol)

代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>列表标签</title>

</head>

<body>

<ol type="">男

<li> 跑车</li>

<li>手表</li>

</ol>

<ol>女

<li>服装</li>

<li>化妆品</li>

</ol>

</body>

</html>

排序:

案例:

(2)快速生成有序列表

ol*3>li*2

代码:

二、无序列表

ul unordery lists (简写:ul)

代码

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>列表标签</title>

</head>

<body>

<ul type=>男

<li>车</li>

<li>房</li>

<li>钞票</li>

</ul>

<ul>女

<li>服装</li>

<li>化妆品</li>

<li>手饰</li>

</ul>

</html>

案例:

(2)快速生成无序列表

ul*2>li*3 按tab键联想

代码: ul*2>li*3

表格标签

(1)认识表中的一些常用单词

border 边距

align 格式 ' center' 对齐

cellspacing 单元格与单元格的距离

cellpadding 单元格与内容的距离

wedth 宽度

height 高度

tr 表示:行

th 表示:表头

td :表示列

(2)输入table +回车

表格的案例

代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>表格标签</title>

</head>

<body>

<table border=" 10" cellspacing="2" align="center" cellpadding="2" width="500" height="500">

<tr>

<th>姓名</th>

<th>性别</th>

<th>分数</th>

</tr>

<tr>

<td>zs</td>

<td>男</td>

<td>80</td>

</tr>

<tr>

<td>ls</td>

<td>女</td>

<td>90</td>

</tr>

</table>

二、合并行

rowspan =行数 合并行

代码

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>表格标签</title>

</head>

<body>

<table border=" 10" cellspacing="2" align="center" cellpadding="2" width="500" height="500">

<tr>

<th>姓名</th>

<th>性别</th>

<th>分数</th>

</tr>

<tr>

<td>zs</td>

<td>男</td>

<td rowspan="2">80</td>

</tr>

<tr>

<td>ls</td>

<td>女</td>

</tr>

</table>

</body>

</html>

三、合并列

colspan="列数"

代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>表格标签</title>

</head>

<body>

<table border=" 10" cellspacing="2" align="center" cellpadding="2" width="500" height="500">

<tr>

<th>姓名</th>

<th>性别</th>

<th>分数</th>

</tr>

<tr>

<td>zs</td>

<td>男</td>

<td >80</td>

</tr>

<tr>

<td>ls</td>

<td colspan="2">女</td>

</tr>

</table>

</body>

</html>

表单标签

一、表单单词介绍:

表单标签格式:form

action:开始网址

method:get和post等等

表单标签:主要用来收集用户输入信息如:登入、注册、搜索商品等

用户名格式:text (明文)

密码格式:password (密文)

性别:radio 性别格式 性别是单选,单选类型是radio,注意name要加上sex

复选框:checkbox

文本框:textarea

上传文件:file

下拉选择框:select

button:按钮

reset:重置

submit:提交

二、表单编写

截图:

代码

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>表单</title>

</head>

<body>

<form action="https://www.baidu.com/" method="post">

<p>用户名:<input type="text" /></p>

<p>密码:<input type="password" /></p>

<p>

<input type="radio" name="sex" id="" value="" />男

<input type="radio" name="sex" id="" value="" />女

</p>

<p>

<input type="checkbox" name="" id="" value="" />linux

<input type="checkbox" name="" id="" value="" />mysql

<input type="checkbox" name="" id="" value="" />python

<input type="checkbox" name="" id="" value="" />java

</p>

<p>

下拉框

<select name="">

<option value="">初中</option>

<option value="">高中</option>

<option value="">大学</option>

</select>

</p>

<p>

自我介绍:<br />

<textarea name="" rows="10" cols="10"></textarea>

</p>

<input type="submit" value="提交"/>

<input type="reset" value="重置"/>

<input type="button" value="按钮"/>

</p>

</form>

</body>

</html>

相关推荐
狂潮lister5 分钟前
狂潮·元理论 | 第5篇:想为你的AI培养个性吗!哈哈哈……(6个测试,教你幻觉的正确玩法)
前端·人工智能
高晶15 分钟前
2A3 单端甲类功放从零制作全攻略:电路设计、焊接调试到煲机维护一站式指南
前端·设计模式
deli00717 分钟前
塔防游戏里怪物为什么绕远路?Canvas 实测 A* 寻路 20 波
前端
小万74217 分钟前
WHO 心理自助指南深度解析:Step-by-Step 与 Doing What Matters in Times of Stress,用循证协议重构心理韧性
前端
代码猎人19 分钟前
前端怎么优化用户体验
前端
deli00721 分钟前
批量加水印还在用在线工具?30 张图 Canvas 本地铺满实测
前端
鸿蒙开发22 分钟前
扫描 PDF 看得见却搜不到?用 Tesseract.js + PDF.js 生成可搜索 PDF
前端·react.js
小万74223 分钟前
ECC(Everything Claude Code)深度解析:把编程 Agent 从“聊天写代码”拉进工程现场的 Harness 系统
前端
用户21455493101529 分钟前
VeapAI 自然语言操作实战|第 02 篇:语义层——把系统讲给模型听的四个构件
前端·后端
定栓1 小时前
Webpack迁到Vite第七节(一):全家桶移除 — 配置文件与构建核心
前端·webpack·node.js