html教程
- HTML 教程
- HTML 5简介
- HTML 5 视频
- HTML 5 音频
- HTML 5 Canvas
- HTML 5 Web 存储
- HTML 5 Input 类型
- HTML 5 表单元素
- HTML 5 表单属性
- HTML 5 参考手册
- HTML 5 标准事件属性
- <!-->
- <!DOCTYPE>
- <abbr>
- <acronym>
- <address>
- <applet>
- <area>
- <article>
- <aside>
- <audio>
- <b>
- <base>
- <basefont>
- <bdo>
- <blockquote>
- <body>
- <br />
- <button>
- <canvas>
- <caption>
- <center>
- <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite> 标签
- <col>
- <colgroup>
- <command>
- <datalist>
- <dd>
- <del>
- <details>
- <dir>
- <div>
- <dl>
- <dt>
- <embed>
- <fieldset>
- <figcaption>
- <figure>
- <font>
- <footer>
- <form>
- <frame>
- <frameset>
- <h1> 至 <h6>
- <head>
- <header>
- <hgroup>
- <hr>
- <html>
- <i>
- <iframe>
- <img>
- <input>
- <ins>
- <keygen>
- <em> <strong> <dfn> <code> <samp> <kbd> <var> <cite>
- <label>
- <legend>
- <li>
- <link>
- <map>
- <mark>
- <menu>
- <meta>
- <meter>
- <nav>
- <noframes>
- <object>
- <ol>
- <optgroup>
- <option>
- <output>
- <p>
- <param>
- <pre>
- <progress>
- <q>
- <rp>
- <rt>
- <ruby>
- <s>
- <script>
- <section>
- <select>
- <small>
- <source>
- <span>
- <strike>
- <style>
- <sub> 和 <sup>
- <summary>
- <table>
- <tbody>
- <td>
- <textarea>
- <tfoot>
- <th>
- <thead>
- <time>
- <title>
- <tr>
- <tt>
- <u>
- <ul>
- <video>
<optgroup> 标签
定义和用法
<optgroup> 标签定义选项组。此元素允许您组合选项。当您使用一个长的选项列表时,对相关的选项进行组合会使处理更加容易。
HTML 4.01 与 HTML 5 之间的差异
没有。
例子
<select> <optgroup label="Swedish Cars"> <option value ="volvo">Volvo</option> <option value ="saab">Saab</option> </optgroup> <optgroup label="German Cars"> <option value ="mercedes">Mercedes</option> <option value ="audi">Audi</option> </optgroup> </select>
属性
属性 | 值 | 描述 | 4 | 5 |
label | text_label | 定义选项组的标注。 | 4 | 5 |
disabled | disabled | 在其首次加载时,禁用该选项组。 | 4 | 5 |
标准属性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,请访问 HTML 5 中标准属性。
事件属性
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup,
onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
如需完整的描述,请访问 HTML 5 中事件属性。
© 2025 Copyright: kuaikuaixuan.com
京ICP备14015652号-3
网址导航