HTML-常用标签解析

<i>斜体</i>  //斜体
<hr />       //水平线
<hr size=“5”> //size:水平线的高度,单位像素
<hr noshade=“noshade” /> //noshade:没有阴影,取值:noshade,表示纯色
<img src=“../logo.pngwidth=“” height=“”  alt=“占位文字说明”/>//../logo.png表示相对路径的图片    eg; ../img/logo.png
<a href=“” target=“”></a> // target:_blank  新开页面跳转


//空格表示
&nbsp

//a标签
<a href="#"></a>   #点击不跳转
里面可以是img,

//无序列表
<ul>
<li>coffee</li>
<li>milk</li>
</ul>

//有序列表
<ol>
<li>coffee</li>
<li>milk</li>
</ol>

//表格标签
//cellpadding:边框与内容距离
  cellspacing:边框与边框距离
<table border=“1px”,cellpadding="1px",cellspacing="1px">
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>

<td colpsan=“2”></td> //表格跨列,2列.右边列内容清除
<td rowsan=“2”></td>  //表格跨行,2行.下一行内容清除

//框架标签(cols:水平分向切割,rows:垂直方向切割)
//e.g.:水平切割,左右各为25%,75%的html
<frameset cols="25%,*">
    <frame src="left.html" />
    <frame src="right.html" />
</frameset>

//e.g.:垂直切割上下两层20%,80%.水平切割左右两层20%,80%.
<frameset rows="20%,*">
        <frame src="top.html" />    
        <frameset cols="20%,*">
                <frame src="left.html" />
                <frame src="right.html" />
        </frameset>
</frameset>


//表单标签 form
 action:整个表单提交的位置(可以是一个页面,也可以说一个后台的java代码)
method:提交的方式(get/post/delete...等7种)
//文本输入项
<input type=“text” name=“” size=“” maxlength=“” readonly=“” placehoder=“”>
//密码输入项
<input type=”password” =”” /> 
//单选按钮
<input type=”radio” =”” value=””  checked=””/> 
//多选按钮
<input type=”checkbox” name=”” value=”” checked=”” /> 
//下拉列表
<select    name=””>
        <option value=“” selected=“”>北京</option>
    <option>上海</option> 
</select> 
//文件上传项
<input type=”file” name=””/> 
//文本输入域
<textarea name=””></textarea> 
//提交按钮
<input type=“submit” value =””/> 
//普通按钮
<input type=”button” value=””/> 
//重置按钮
<input type=”reset” value=””/> 
//隐藏项
<input type=”hidden” name=””/> 
表单标签的例子
<form action="#" method="get">
            隐藏字段:<input type="hidden" name="id" value="" /><br />
            用户名:<input type="text" name="username" readonly="readonly" value="zhangsan" size="40px" maxlength="5"  placeholder="请输入用户名"/><br />
            密码:<input type="password" name="password" required="required"/><br />
            确认密码:<input type="password" name="repassword"/><br />
            性别:<input type="radio" name="sex" value="男"/>男
            <input type="radio" name="sex" value="女" checked="checked"/>女<br />
            爱好:<input type="checkbox" name="hobby" value="钓鱼"/>钓鱼
            <input type="checkbox" name="hobby" value="打电动"/>打电动
            <input type="checkbox" name="hobby" value="写代码" checked="checked"/>写代码<br />
            头像:<input type="file" name="file"/><br />
            籍贯:<select name="province">
                <option>--请选择--</option>
                <option value="北京">北京</option>
                <option value="上海" selected="selected">上海</option>
                <option value="广州">广州</option>
            </select><br />
            自我介绍:
                <textarea name="zwjs">

                </textarea><br />
            提交按钮:<input type="submit" value="注册"/><br />
            普通按钮:<input type="button" value="zhuce"/><br />
            重置按钮:<input type="reset" />
        </form>

//效果图
表单标签例子

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值