html 最基础实用的表单标签

jsp之基本标签

1、基本的html 标签使用

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>The first html</title><!--标题 -->
</head>
<body bgcolor="88ada6">
<!-- 这是一个超链接锚点 为起始锚点 -->
<a name="start"></a>

<a href="#middle">我是起点超链接点我可到中间部分</a><br /><br />
<!-- 需求1:在网页上显示 我是字体标签 ,并修改字体为 宋体,颜色为红色。 -->
<font face="宋体" color="#ff0000">我是字体标签</font>
<br />

<!-- 需求1:把 <br> 换行标签 变成文本 转换成字符显示在页面上 -->
我是换行标签&lt;br&gt;
<p>我是段落标签&lt;p&gt;我的上边和下边会自己空一行</p>
<!-- 需求1:演示标题1到 标题6的 -->
<h6>我是六级标题 为最小标题了 我默认为左对齐</h6>
<h5 align="center">我是五级标题 我用align设置中对齐</h5>
<h4 align="center">我是四级标题 我用align设置中对齐</h4>
<h3 align="center">我是三级标题 我用align设置中对齐</h3>
<h2 align="right">我是二级标题 我用align设置右对齐</h2>
<h1>我是一级标题 为最大标题了</h1>

<font  size="3" color="blue">我用 宋体 蓝色 大小为 8 告诉你下面为img标签</font>
<br/>

<!-- img标签链接图片如下 -->
<table border="1" cellspacing="3" cellpadding="2" >
<tr>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/1.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/2.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/10.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/4.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/5.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
</tr>
<tr>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/6.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/7.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
<td>
    <img alt="sorry 尽力加载还是无缘 " src="imgs/8.jpg" width="150px" height="180px" border="1"/>
    <br />
</td>
</tr>
</table>

<a name="middle"></a>
<a  href="#start">我是位于中部的(锚点)点我返回顶部</a><br />
如果图片存在效果如下:

这里写图片描述


  • 刘德华
  • 张学友
  • 黎明
  • 郭富城


  1. 刘德华
  2. 张学友
  3. 黎明
  4. 郭富城

<!-- 需求1:普通的 超连接。 -->
<!-- 在新窗口中打开链接 邮件发送 -->
<a href="mailto:1243281068@qq.com" target="_blank">联系我(邮箱)</a>  
<br />
<br />
<center>
    <hr />
    <font size="5" face="宋体"
    color="#028300">我用了&lt;center&gt;设置了表格居中 如下</font>
<table height="210px" width="210px" border="1" cellspacing="0" cellpadding="">
<tr bgcolor="red">
     <td colspan="2"></td>
     <td rowspan="2" bgcolor="yellow"></td>
</tr>
<tr bgcolor="824720">
     <td rowspan="2" bgcolor="green"></td>
     <td height="70px" width="70px" align="center">炸</td>
</tr>

<tr bgcolor="blue">
     <td colspan="2"></td>

</tr>
</table>
</center>
<br />

表格的跨行跨列效果如下:
这里写图片描述

    <font size="4" face="宋体" color="#0e890f">我用了&lt;center&gt;设置了居中的表单 如下</font>
<br />

<form action="" method="post">
<center>
<table border="0" cellpadding="0" cellspacing="5" bgcolor="808080">
<tr>
    <th>注册form表单</th>
</tr>
<tr>
    <td>
        用户名:<input type="text" value="请改写"/>
    </td>   
</tr>
<tr>
    <td>
        密码:<input type="password" value="*****"/>
    </td>   
</tr>
<tr>
    <td>
        性别:<input type="radio" name="sex" value="boy" checked="checked"/>男
        <input type="radio" name="sex" value="girl"/>女
    </td>
</tr>
<tr>
    <td>
   兴趣爱好: <input type="checkbox" name=like value="足球" checked="checked"/>足球
        <input type="checkbox" name=like value="篮球"/>篮球
        <input type="checkbox" name=like value="乒乓球"/>乒乓球
        <input type="checkbox" name=like value="台球"/>台球
    </td>
</tr>
<tr>
    <td>
    请选择所属地:<select name="city">
                <option value="北京" selected="selected">北京</option>
                <option value="北京">上海</option>
                <option value="北京">广州</option>
                <option value="北京">深证</option>
        </select>
    </td>
</tr>
<tr>
    <td>
        请上传头像:<input type="file"/>
    </td>   
</tr>
<tr>
    <td> 自我介绍:</td>
</tr>
<tr>
    <td>
        <textarea rows="15" cols="20">请简单的自我介绍</textarea>
    </td>
</tr>
<tr>
    <td><input type="hidden" value="我是隐藏域" name="hiddenValues"/></td>
</tr>
<tr>
    <td>
        <input type="submit" value="确认提交"/>&nbsp;&nbsp;&nbsp;
         <input type="reset" value="重置"/>
    </td>
</tr>
</table>
</center>
</form>
<a href="#middle">我是一个超链接 可以点我回到中间!</a> <br  />

表单效果如下:
这里写图片描述

<br />
<br />
<br />
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值