分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > IT知识

前端开发之html基础知识02

发布时间:2023-09-06 02:13责任编辑:彭小芳关键词:前端开发前端

经典表格:表格没有列的概念,只有行的概念, 一行 tr,行中的单元格 td
表头的突出显示:tr>th

<table width="400px" align="center" border="1px" cellspacing="0"
cellpadding="5px"
> <!-- align = "center" 表格整体剧中-->
<caption>个人信息表</caption>
<thead>
<tr align="center">
<td>姓名</td>
<td>性别</td>
<td>电话</td>
</tr>
</thead>
<tbody>
<tr align="center">
<td>小明</td>
<td>男</td>
<td>187</td>
</tr>
<tr align="center">
<td>小红</td>
<td>女</td>
<td>157</td>
</tr>
</tbody>
</table>

表格其他设置:单元边框和表格边框的距离-> cellspacing 0

合并单元格:
跨行rowspan
跨列colspan

表单控件

<label for="i1">用户名<input type="text" id = i1></label>
label 标签用于点击标签即可跳转到输入框,提高用户体验

文本域,不支持富文本:<textarea name="" id="" cols="3" rows="5" ></textarea>

下拉菜单:select>option
<select name="" id="">
<option value="">1992</option>
<option value="">1993</option>
<option value="">1994</option>
<option value="">1995</option>
</select>

input属性: 提示: checked = "checked" 为单选默认选中状态 maxlength = 6

text
password

radio单选需要在每个选项中 name的值保持一致
<label for=""><input type="radio" name="gender">男</label>
<label for=""><input type="radio" name = "gender">女</label>

checkbox多选
<label for=""><input type="checkbox" name = “like1”>篮球</label>
<label for=""><input type="checkbox" name = “like2”>足球</label>
<label for=""><input type="checkbox" name = “like2”>排球</label>

btton按钮
submit提交
reset重置
image
file

form 表单:
<form action="http://baidu.com" method="get" name = "mydata">

前端开发之html基础知识02

原文地址:https://www.cnblogs.com/huasongweb/p/9589897.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved