HTML表单制作个人简历

**

先看在谷歌浏览器中的效果

在这里插入图片描述
表单常用标签:

border:设置表格的边框
cellspacing:单元格与单元格之间的距离
bgcolor:表格的背景色
colspan:跨列数
rowspan:跨行数

table>(tr>td*n)*m 可生成一个m行n列的表格
例如生成一个2行3列的表格
在这里插入图片描述

HTML代码实现:

<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        /* 设置表格的宽和高,单元格文本框溢出隐藏 */
        td{width: 100px;overflow: hidden;} 
        tr{height: 35px;}
        /* 设置输入框的大小沾满整个单元格 */
        input{border: 0;
            width: 100%;
            height: 100%;
            outline: none;
            text-align: center;}
    </style>    
    <title>resume</title>
</head>
<body>
    <h2 style="text-align: center;">个人简历</h2>
    <form>
        <table border="1" align="center" cellspacing="0">
            <tbody align="center">
                <tr>
                    <td bgcolor="#ededed">姓名</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">性别</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">出生年月</td>
                    <td><input type="text"></td>
                    <td style="width: 120px;" align="left" rowspan="4"></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">名族</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">政治面貌</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">身高</td>
                    <td><input type="text"></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">学制</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">学历</td>
                    <td><input type="text"></td>
                    <td bgcolor="#ededed">户籍</td>
                    <td><input type="text"></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">专业</td>
                    <td><input type="text"></td>
                    <td colspan="2" bgcolor="#ededed">毕业学校</td>
                    <td colspan="2"><input type="text"></td>
                </tr>
                <tr>
                    <td colspan="7"><b>技能、特长或爱好</b></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">外语等级</td>
                    <td colspan="2"><input type="text"></td>
                    <td bgcolor="#ededed">计算机</td>
                    <td colspan="3"><input type="text"></td>
                </tr>
                <tr>
                    <td colspan="7"><b>个人履历</b></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">时间</td>
                    <td colspan="2" bgcolor="#ededed">单位</td>
                    <td colspan="4" bgcolor="#ededed">经历</td>
                </tr>
                <tr>
                    <td><input type="text"></td>
                    <td colspan="2"><input type="text"></td>
                    <td colspan="4"><input type="text"></td>
                </tr>
                <tr>
                    <td><input type="text"></td>
                    <td colspan="2"><input type="text"></td>
                    <td colspan="4"><input type="text"></td>
                </tr>
                <tr>
                    <td><input type="text"></td>
                    <td colspan="2"><input type="text"></td>
                    <td colspan="4"><input type="text"></td>
                </tr>
                <tr>
                    <td colspan="7"><b>联系方式</b></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">联系电话</td>
                    <td colspan="2"><input type="text"></td>
                    <td bgcolor="#ededed">通信地址</td>
                    <td colspan="3"><input type="text"></td>
                </tr>
                <tr>
                    <td bgcolor="#ededed">E-mail</td>
                    <td colspan="2"><input type="email"></td>
                    <td bgcolor="#ededed">邮编</td>
                    <td colspan="3"><input type="text"></td>
                </tr>
                <tr>
                    <td colspan="7"><b>自我评价</b></td>
                </tr>
                <tr style="height: 110px;">
                    <td colspan="7"><input type="text"></td>
                </tr>
            </tbody>
        </table>
    </form>
</body>
</html>
  • 3
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
HTML表单是一种通过Web页面收集用户输入数据的方式。以下是制作HTML表单的基本步骤: 1. 使用HTML中的`<form>`元素创建表单,定义表单的属性,例如method和action等。 2. 在表单中添加各种输入元素,例如文本框、单选框、复选框、下拉列表等。每个输入元素都需要一个唯一的name属性,用于在提交表单时标识输入的数据。 3. 使用HTML中的`<label>`元素为每个输入元素创建标签,标签中的for属性应该指向对应输入元素的id属性。 4. 添加提交按钮,使用HTML中的`<input>`元素,type属性设置为submit。 下面是一个简单的HTML表单示例: ``` <form action="process.php" method="post"> <label for="name">姓名:</label> <input type="text" id="name" name="name"><br> <label for="gender">性别:</label> <input type="radio" id="male" name="gender" value="male"> <label for="male">男</label> <input type="radio" id="female" name="gender" value="female"> <label for="female">女</label><br> <label for="hobby">爱好:</label> <input type="checkbox" id="reading" name="hobby[]" value="reading"> <label for="reading">阅读</label> <input type="checkbox" id="sports" name="hobby[]" value="sports"> <label for="sports">运动</label><br> <label for="city">城市:</label> <select id="city" name="city"> <option value="beijing">北京</option> <option value="shanghai">上海</option> <option value="guangzhou">广州</option> <option value="shenzhen">深圳</option> </select><br> <input type="submit" value="提交"> </form> ``` 在这个例子中,我们创建了一个包含姓名、性别、爱好和城市的表单。当用户提交表单时,表单数据将被发送到`process.php`进行处理。其中,姓名是一个文本输入框,性别是两个单选框中的一个,爱好是两个复选框中的一个或多个,城市是一个下拉列表。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值