input标签中各个属性的作用,css中input属性
大家好,今天小编来为大家解答以下的问题,关于input标签中各个属性的作用,css中input属性这个很多人还不知道,现在让我们一起来看看吧!
input标签的六大属性分别是什么
属性值
描述
button定义可点击按钮(多数情况下,用于通过 JavaScript启动脚本)。
checkbox定义复选框。
file定义输入字段和"浏览"按钮,供文件上传。
hidden定义隐藏的输入字段。
image定义图像形式的提交按钮。
password定义密码字段。该字段中的字符被掩码。
radio定义单选按钮。
reset定义重置按钮。重置按钮会清除表单中的所有数据。
submit定义提交按钮。提交按钮会把表单数据发送到服务器。
text定义单行的输入字段,用户可在其中输入文本。默认宽度为 20个字符。
HTML5中input元素新增加哪些type属性值它们有什么作用
在HTML5中,为input元素新增了以下一些type属性值,用来丰富文本框的类型。
color:用于指定颜色的控件。
date:用于输入日期的控件(年,月,日,不包括时间)。
datetime:基于 UTC时区的日期时间输入控件(时,分,秒及几分之一秒)。
datetime-local:用于输入日期时间控件,不包含时区。
email:用于编辑 e-mail的字段。
month:用于输入年月的控件,不带时区。
number:用于输入浮点数的控件。
range:用于输入不精确值控件。
search:用于输入搜索字符串的单行文本字段。换行会被从输入的值中自动移除。
tel:用于输入电话号码的控件。
time:用于输入不含时区的时间控件。
url:用于编辑URL的字段。。
week:用于输入一个由星期-年组成的日期,日期不包括时区。推荐你去一个教学网站秒秒学上把这些知识过一遍,夯实下基础。
请写出至少20个html标签,并说说各个标签的功能或作用。
Basic tags基本标签
<html></html> Creates an HTML document创建一个HTML文档
<head></head> Sets off the title and other
information that isn't displayed
on the Web page itself设置文档标题以及其他不在WEB网页上显示的信息
<body></body> Sets off the visible portion of
the document设置文档的可见部分
Header tags
标题标签
<title></title> Puts the name of the document
in the title bar将文档的题目放在标题栏中
Body attributes
文档整体属性
<body bgcolor=?> Sets the background color,
using name or hex value设置背景颜色,使用名字或十六进制值
<body text=?> Sets the text color, using
name or hex value设置文本文字颜色,使用名字或十六进制值
<body link=?> Sets the color of links,
using name or hex value设置链接颜色,使用名字或十六进制值
<body vlink=?> Sets the color of followed
links, using name or hex value设置已使用的链接的颜色,使用名字或十六进制值
<body alink=?> Sets the color of links on click设置正在被击中的链接的颜色,使用名字或十六进制值
Text tags
文本标签
<pre></pre> Creates preformatted text创建预格式化文本
<h1></h1> Creates the largest headline创建最大的标题
<h6></h6> Creates the smallest headline创建最小的标题
<b></b> Creates bold text创建黑体字
<i></i> Creates italic text创建斜体字
<tt></tt> Creates teletype, or
typewriter-style text创建打字机风格的字体
<cite></cite> Creates a citation, usually
italic创建一个引用,通常是斜体
<em></em> Emphasizes a word(with italic
or bold)加重一个单词(通常是斜体加黑体)
<strong></strong> Emphasizes a word(with italic
or bold)加重一个单词(通常是斜体加黑体)
<font size=?></font> Sets size of font, from 1 to 7设置字体大小,从 1到 7
<font color=?></font> Sets font color, using name or
hex value设置字体的颜色,使用名字或十六进制值
..........
看参考资料吧很全
好了,本文到此结束,如果可以帮助到大家,还望关注本站哦!