Blogger Information
Blog 15
fans 0
comment 0
visits 11575
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0403 html基础2
Mryang的博客
Original
633 people have browsed it

0403 html基础2

1.语义化元素

  1. <h1> - <h6> : 划分段落
  2. <header> : 页眉
  3. <footer> : 页脚
  4. <main> : 主体
  5. <aside> : 侧边栏
  6. <section> : 区段
  7. <nav> : 导航
  8. <div> : 通用
  1. <!-- 页眉 -->
  2. <header>
  3. <nav>
  4. <a href="">nemu1</a>
  5. <a href="">nemu2</a>
  6. <a href="">nemu3</a>
  7. </nav>
  8. </header>
  9. <!-- 内容主体区 -->
  10. <div class="container">
  11. <!-- 边栏 -->
  12. <aside>
  13. <section class="ads">广告位</section>
  14. </aside>
  15. <!-- 主体区 -->
  16. <main>
  17. <div class="article">
  18. <h2>PHP中文网</h2>
  19. <p>...</p>
  20. </div>
  21. </main>
  22. </div>
  23. <!-- 页脚 -->
  24. <footer>
  25. <section class="link">
  26. <a href="">Copyright © 2013-2020</a>
  27. </section>
  28. </footer>

2.语义化文本元素

  1. <p>,<span>,<br>,<span>,<time>,<abbr>,<address>,<code>...
  1. <time>2020-04-03</time>
  2. <p>
  3. <abbr title="超文本标记语言">HTML</abbr>
  4. </p>
  5. <p>
  6. 2<sup>4</sup>=16
  7. </p>
  8. <footer>
  9. <address>合肥市政务新区</address>
  10. </footer>
  11. <p>
  12. <code>
  13. const username = 'aba'
  14. </code>
  15. </p>

3.链接、列表与图像

  1. <a> : 链接
  2. <ul><li>无序列表</li></ul>
  3. <ol><li>有序列表</li></ol>
  4. <img> : 图像
  1. <a href="https://www.php.cn" target="_blank">PHP中文网</a>
  2. <a href="0403.md" download='html教程.md'>0403.md</a>
  3. <a href='tel:13132...'>客服热线</a>
  4. <a href='mailto:13132..@qq.com'>发邮件</a>
  5. <a href="#maodian">跳转到锚点</a>
  6. <h1 id = 'maodian' style='margin-top:1000px'>锚点</h1>

  1. <!-- 无序列表 -->
  2. <h3>购物车</h3>
  3. <ul>
  4. <li>kindle</li>
  5. <li>akg y50</li>
  6. <li>ipad</li>
  7. </ul>
  8. <!-- 有序列表 -->
  9. <h3>购物车</h3>
  10. <ol>
  11. <li>kindle</li>
  12. <li>akg y50</li>
  13. <li>ipad</li>
  14. </ol>
  15. <!-- 自定义列表 -->
  16. <dl>
  17. <dt>HTML</dt>
  18. <dd>超文本标记语言</dd>
  19. <dt>CSS</dt>
  20. <dd>层叠样式表</dd>
  21. <dt>JavaScript</dt>
  22. <dd>前段通用脚本语言</dd>
  23. </dl>

4.表格与框架

  1. <table> + <tr> + <td>
  1. <table border="1" cellpadding='5' cellspacing='0' width=500>
  2. <colgroup bgcolor='lightyellow'>
  3. <col bgcolor='lightpink'>
  4. <col>
  5. <col bgcolor='lightgreen' span="2">
  6. <col>
  7. <col>
  8. </colgroup>
  9. <caption style='font-size: 1.5em;margin-bottom:10px'>
  10. 学生信息表
  11. </caption>
  12. <thead>
  13. <tr bgcolor='lightblue'>
  14. <th>班级</th>
  15. <th>姓名</th>
  16. <th>学号</th>
  17. <th>年龄</th>
  18. <th>性别</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <tr>
  23. <td rowspan="2">1</td>
  24. <td>小明</td>
  25. <td>101</td>
  26. <td>15</td>
  27. <td></td>
  28. </tr>
  29. <tr>
  30. <!-- <td>1</td> -->
  31. <td>小刚</td>
  32. <td>102</td>
  33. <td>15</td>
  34. <td></td>
  35. </tr>
  36. </tbody>
  37. <tbody
  38. <tr>
  39. <td>2</td>
  40. <td>小红</td>
  41. <td>201</td>
  42. <td>15</td>
  43. <td></td>
  44. </tr>
  45. </tbody>
  46. <tfoot>
  47. <tr>
  48. <td colspan="5" align="center" bgcolor="yellow">备注:........</td>
  49. </tr>
  50. </tfoot>
  51. </table>

5.表单

  1. <form action=''>
  2. <input type='text'>
  3. <input type='password'>
  4. <input type='radio'>
  5. <input type='checkbox'>
  1. <h3>用户注册</h3>
  2. <form action="">
  3. <section>
  4. <label for="username">用户名:</label>
  5. <input type="text" name="username" id="username" placeholder="不大于6位" required>
  6. </section>
  7. <section>
  8. <label for="password">密 码:</label>
  9. <input type="password" name="password" id="password" placeholder="不少于8位" required>
  10. </section>
  11. <!-- 单选框 -->
  12. <section>
  13. <label for="">性别</label>
  14. <div class='box'>
  15. <input type="radio" name="gender" id="male" value='male'>
  16. <label for="male"></label>
  17. <input type="radio" name="gender" id="famale" value='famale'>
  18. <label for="famale"></label>
  19. </div>
  20. </section>
  21. <!-- 复选框 -->
  22. <section>
  23. <label for="">兴趣</label>
  24. <div class="box">
  25. <input type="checkbox" name="hobby[]" id="game" value="game" checked>
  26. <label for="game">游戏</label>
  27. <input type="checkbox" name="hobby[]" id="travel" value="travel">
  28. <label for="travel">旅游</label>
  29. <input type="checkbox" name="hobby[]" id="shoot" value="shoot">
  30. <label for="shoot">摄影</label>
  31. <input type="checkbox" name="hobby[]" id="program" value="program" checked>
  32. <label for="program">编程</label>
  33. </div>
  34. </section>
  35. </form>

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:总结的好棒
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post