表格练习案例

这是一个HTML注册页面的示例,包含性别选择、生日输入、地区填写、婚姻状况、学历填写、喜欢类型的选择以及个人介绍的文本区域。用户可以选择性别、出生年月日、填写所在地区、婚姻状态、最高学历,并勾选喜欢的类型。此外,还需要填写个人简介并同意注册条款。页面底部提供了免费注册按钮和会员登录链接。
摘要由CSDN通过智能技术生成

简单表格案例

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <meta charset="UTF-8">
  <title>注册页面</title>
  <style>
    .married-form {
      width:500px;
      margin-bottom: 6px;
      font: 16px/1.5 Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    }

    .left-section {
      margin-right: 30px;
    }
    /* 开启相对定位,不会影响布局 */
    #brief-intro {
      position: relative;
      top: -140px;
    }

    #others {
      margin-left: 110px;
    }
  </style>
</head>

<body>
  <form action="#" method="POST" name="marray">
    <h4>青春不常在,抓紧谈恋爱</h4>
    <div id="gender" class="married-form">
      <span class="left-section">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</span>
      <label for="man">
        <input type="radio" name="sex" id="man">
        <img src="./images/man.jpg" alt="男">男
      </label>
      <label for="woman">
        <input type="radio" name="sex" id="women">
        <img src="./images/women.jpg" alt="女">女
      </label>
    </div>
    <div id="birthday" class="married-form">
      <span class="left-section">生&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日:</span>
      <label for="year">
        <select id="year">
          <option selected="selected">-请选择年份-</option>
          <option>2019</option>
          <option>2020</option>
          <option>2021</option>
        </select>
        <label for="month">
          <select id="month">
            <option selected="selected">-请选择月份-</option>
            <option>1</option>
            <option>2</option>
            <option>3</option>
          </select>
          <label for="day">
            <select id="day">
              <option selected="selected">-请选择日-</option>
              <option>1</option>
              <option>2</option>
              <option>3</option>
            </select>
          </label>
    </div>
    <div id="area" class="married-form">
      <span class="left-section">所在地区:</span>
      <input type="text" value="广州" style="width:350px">
    </div>
    <div id="maritalState" class="married-form">
      <span class="left-section">婚姻状况:</span>
      <label for="unmarried">
        <input type="radio" name="marital" id="unmarried">未婚
      </label>
      <label for="married">
        <input type="radio" name="marital" id="married">已婚
      </label>
      <label for="divorced">
        <input type="radio" name="marital" id="divorced">离婚
      </label>
    </div>
    <div id="education" class="married-form">
      <span class="left-section">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历:</span>
      <label for="edu">
        <input type="text" value="博士后" id="edu" style="width:350px">
      </label>
    </div>
    <div id="lovedType" class="married-form">
      <span class="left-section">喜欢类型:</span>
      <label for="graceful">
        <input type="checkbox" name="type" id="graceful">妩媚的
      </label>
      <label for="cute">
        <input type="checkbox" name="type" id="cute">可爱的
      </label>
      <label for="young">
        <input type="checkbox" name="type" id="young">小鲜肉
      </label>
      <label for="old">
        <input type="checkbox" name="type" id="old">老腊肉
      </label>
      <label for="allLoved">
        <input type="checkbox" name="type" id="allLoved" checked="checked">都喜欢
      </label>
    </div>
    <div id="personalIntroduce" class="married-form">
      <span class="left-section" id="brief-intro">个人介绍:</span>
      <label for="intro">
        <textarea name="perIntro" id="intro" cols="48" rows="10">个人简介</textarea>
      </label>
    </div>
    <div id="others" class="married-form">
      <div id="login">
        <input type="submit" value="免费注册">
        <br>
        <input type="checkbox">我同意注册条款和会员加入标准
        <br>
        <a href="#">我是会员,立即登录</a>
      </div>
      <h5>我承诺</h5>
      <ul>
        <li>年满18岁、单身</li>
        <li>抱着严肃的态度</li>
        <li>真诚寻找另一半</li>
      </ul>
    </div>
  </form>
</body>

</html>

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值