经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » HTML/CSS » CSS » 查看文章
html
来源:cnblogs  作者:recreyed  时间:2021/5/10 8:48:27  对本文有异议

HTML

1.1常用编辑器

dreamweaver、sublime、webstorm、Hbuilder、vscode

1.2 浏览器内核

分为渲染引擎和JS引擎

渲染引擎:它负责取得网页的内容(HTML、XML、图像等等)、整理讯息(例如加入CSS 等),以及计算网页的显示方式,然后会输出至显示器或打印机

JS引擎:JS引擎则是解析Javascript语言,执行javascript语言来实现网页的动态效果

  • IE: Trident
  • Firefox: Gecko
  • Chrome: Webkit 到 Blink
  • Safari: Webkit
  • Opera: Presto 到 Webkit 到 Blink

1.3 标签

  1. <!-- 四类八种 -->
  2. <b>粗体</b><strong></strong>
  3. <i>斜体</i><em></em>
  4. <s>删除线</s><del></del>
  5. <u>下划线</u><ins></ins>
  6. <img src="图片路径" alt="出错显示信息">
  7. <a href="跳转链接" target="目标窗口的弹出方式">文本或图像</a>
  8. <!-- 锚点定位 -->
  9. <a href="#one"></a>
  10. <p id="one">段落</p>
  11. <ul>
  12. <li></li>
  13. <li></li>
  14. </ul>

1.4 表格

  1. <table align="center" border="1" cellspacing="0" cellpadding="10" width="900">
  2. <caption>年中工资报表</caption>
  3. <thead>
  4. <tr>
  5. <th colspan="2">区域办事处</th>
  6. <!-- <th>岗位</th> -->
  7. </tr>
  8. </thead>
  9. <tbody>
  10. <tr>
  11. <td rowspan="2">abc</td>
  12. <td>abc</td>
  13. </tr>
  14. <tr>
  15. <!-- <td>abc</td> -->
  16. <td>abc</td>
  17. </tr>
  18. </tbody>
  19. </table>
  1. 合并单元格的步骤是?
    1.先判断是跨行(rowspan)还是跨列(colspan)
    2.把属性名和合并的行数写在第一个要合并的单元格上
    3.把多余的单元格注释掉
  2. table布局的缺点是?
    a.太深的嵌套,比如table> tr> td>h3,会导致搜索引擎读取困难,而且,最直接的损失就是大大增加了冗余代码量。
    b.灵活性差,比如要将tr设置border等属性, 是不行的,得通过td
    c.代码臃肿,当在table中套用table的时候, 阅读代码会显得异常混乱
    d.混乱的colspan与rowspan,用来布局时,频繁使用他们会造成整个文档顺序混乱。
    e.不够语义化

1.5 表单

  1. <!--
  2. action 提交的地址
  3. method 提交的方式
  4. name 表单名字
  5. -->
  6. <form action="https://www.baidu.com" method="GET" name="form1">
  7. <!--
  8. label 标记标签 (获取焦点 label for与input id)
  9. input 控件标签 size 长度
  10. -->
  11. <div>
  12. <label for="user">姓名</label>
  13. <input type="text" id="user" value="默认值">
  14. </div>
  15. <!-- 密码框 -->
  16. <div>
  17. <label for="pwd">密码</label>
  18. <input type="password" id="pwd" size="30">
  19. </div>
  20. <!--
  21. 单选框,name一样具有单选效果
  22. 默认单选框内容:
  23. checked="checked"
  24. checked=true
  25. checked
  26. -->
  27. <div>
  28. <input type="radio" name="sex" checked><span></span>
  29. <input type="radio" name="sex"><span></span>
  30. </div>
  31. <!-- 多选框 -->
  32. <div>
  33. <input type="checkbox" checked><span>1</span>
  34. <input type="checkbox"><span>2</span>
  35. <input type="checkbox" checked><span>3</span>
  36. </div>
  37. <!--
  38. 组合标签
  39. 默认选择内容,selected,同checked
  40. -->
  41. <div>
  42. <span>家庭住址</span>
  43. <select name="" id="">
  44. <option value="">石家庄</option>
  45. <option value="" selected>迁安</option>
  46. </select>
  47. </div>
  48. <br>
  49. <!-- row 长 cols宽 -->
  50. <div>
  51. <span>多行文本框</span>
  52. <textarea name="" id="" cols="30" rows="7"></textarea>
  53. </div>
  54. <br>
  55. <input type="reset" value="重新设置">
  56. <input type="button" value="普通按钮">
  57. <input type="submit" value="提交按钮">
  58. </form>

1.6 HTML5

  1. <header>头部标签</header>
  2. <!-- 导航标签 -->
  3. <nav>
  4. <ul>
  5. <li><a href="#">导航标签链接1</a></li>
  6. <li><a href="#">导航标签链接2</a></li>
  7. </ul>
  8. </nav>
  9. <section>小节标签</section>
  10. <section>
  11. <!-- 侧边栏标签aside -->
  12. <aside>
  13. <ul>
  14. <li> <a href="\"></a> 侧边栏</li>
  15. </ul>
  16. </aside>
  17. </section>
  18. <section>
  19. <!-- 文章标签 -->
  20. <article></article>
  21. </section>
  22. <footer>尾部标签</footer>
  23. <!-- 进度条标签 -->
  24. <progress max="600" value="100"></progress>

1.7 HTML5-form

  1. <form action="#" method="GET" name="form-1">
  2. <!-- h5新增选择框 -->
  3. <span>选择</span>
  4. <input type="text" list="l1">
  5. <datalist id="l1">
  6. <option value="op3"></option>
  7. <option value="op4"></option>
  8. <option value="op5"></option>
  9. </datalist>
  10. <button>h5普通按钮</button>
  11. <section>
  12. <!--
  13. placeholder:占位符
  14. required:不能为空
  15. autofocus:自动获取焦点
  16. autocomplete:自动完成
  17. -->
  18. <label for="user">姓名</label>
  19. <input type="text" id="user" name="user" placeholder="占位符" required autofocus autocomplete="off">
  20. </section>
  21. <section>
  22. <!-- maxlength -->
  23. <label for="pwd">密码</label>
  24. <input type="password" id="pwd" name="pwd" placeholder="占位符" maxlength="6" minlength="3">
  25. </section>
  26. <!-- 新增的table属性 -->
  27. <section>
  28. <label for="">邮箱</label>
  29. <input type="email" autocomplete="off">
  30. </section>
  31. <section>
  32. <label for="">地址</label>
  33. <input type="url" name="" id="">
  34. <input type="color">
  35. </section>
  36. <section>
  37. <label for="">搜索框</label>
  38. <input type="search" placeholder="输入搜索内容">
  39. </section>
  40. <section>
  41. <label for="">时间</label>
  42. <input type="time" name="" id=""><br>
  43. <label for="">日期</label>
  44. <input type="date" name="" id=""><br>
  45. <label for="">月份</label>
  46. <input type="month" name="" id=""><br>
  47. <label for=""></label>
  48. <input type="week" name="" id="">
  49. </section>
  50. </form>

1.8 HTML5-media

  1. <!--
  2. 控件:controls
  3. 循环:loop
  4. 静音:muted
  5. -->
  6. <audio src="" controls loop="loop" muted="muted"></audio>
  7. <audio controls>
  8. <source src="">
  9. </audio>
  10. <video src="" controls loop="loop" muted="muted" width="200" height="300"></video>
  11. <!-- video双标签,同audio -->

原文链接:http://www.cnblogs.com/recreyed/p/html.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号