zoukankan      html  css  js  c++  java
  • HTML常用标签

    html常用标签

    <h1> </h1>
    <h2> </h2>
    <h3> </h3>
    ...
    
    <p> </p> //段落标签
    
    <hr /> //水平线标签
    
    <br /> //换行标签
    
    <div> </div>
    <span> </span>
    
    <img src="url" /> //图像标签
    
    <a href="" target="self"> </a>  //链接标签
    
    <!-- 注释语句 --> //注释标签
    
    

    相对路径 | 绝对路径

    表格标签

    <table>
        <tr>
            <th>表头</th>
            ...
        </tr>
        <tr>
            <td>单元格内的文字</td>
            ...
        </tr>
        ...
    </table>
    

    无序列表

    <ul>
        <li> </li>
        <li> </li>
        <li> </li>
        ...
    </ul>
    
    //有序列表
    <ol>
        <li> </li>
        <li> </li>
        <li> </li>
        ...
    </ol>
    
    //自定义列表
    <dl>
        <dt>名词1</dt>
        <dd>名词1解释1</dd>
        <dd>名词1解释2</dd>
        ...
    </dl>
    

    表单标签

    <input type="属性值" value="" name="">
    
    属性 属性值 描述
    type text 单行文本输入框
    type password 密码输入框
    type radio 单选按钮
    type checkbox 复选框
    type button 普通按钮
    type submit 提交按钮
    type reset 重置按钮
    type image 图像形式的提交按钮
    type file 文件域
    name 由用户自定义 控件的名称
    value 由用户自定义 input控件中的默认文本值
    size 正整数 input控件在页面中的显示宽度
    checked checked 定义选择控件默认被选中的项
    maxlength 正整数 控件允许输入的最多字符数

    label标签(提升用户体验)

    <label>
        用户名:<input type="text" name="username" value="">
    </label>
    

    textarea控件(文本域)

    <textarea>
    文本内容
    </textarea>
    

    select下拉列表

    <select>
        <option>选项1</option>
        <option>选项2</option>
        <option>选项3</option>
        ...
    </select>
    

    form表单域

    <form action="url地址" method="提交方式get/post" name="表单名称">
    </form>
    
  • 相关阅读:
    linux下面安装maven
    go 安装
    linux scp 服务器远程拷贝
    git有merge时如何删除分支
    influxdb ERR: error parsing query: found -, expected
    influxDB学习总结
    influxdb Measurements
    go exec: "gcc": executable file not found in %PATH%
    php计算脚本执行时间
    安装nodejs和grunt以后出现 /usr/bin/env: node: No such file or directory
  • 原文地址:https://www.cnblogs.com/chenzilin/p/11997446.html
Copyright © 2011-2022 走看看