04-HTML5常用标签-HTML5极速入门

水中月牙 2021-05-03 03:38:22
html html5 标签 常用 04-html5



HTML 文档是由各种标签组成的。那么,学习了标签的使用,也就可以轻松自如的编写 HTML 文档了。

HTML标题

标题是通过 <h1> - <h6> 这样的标签进行定义的。

<h1>这是一个标题1</h1> <h2>这是一个标题2</h2> <h3>这是一个标题3</h3>……<h6>这是一个标题6</h6>

其中,<h1> 是最大的标题,<h6> 是最小的标题。效果如下:


04-HTML5常用标签-HTML5极速入门

HTML水平线

<hr> 标签可用于分隔内容,如下所示:

<h1>这是一个标题1</h1> <h2>这是一个标题2</h2> <h3>这是一个标题3</h3><hr><h6>这是一个标题6</h6>

04-HTML5常用标签-HTML5极速入门

HTML段落

段落是通过 <p> 标签定义的,浏览器会自动地在段落的前后添加空行。如下所示:

<p>这是段落A</p> <p>这是段落B</p>

04-HTML5常用标签-HTML5极速入门

HTML 折行

如果想在一个段落内进行换行,可以使用 <br> 标签,如下所示:

<p>现在<br>演示一下<br>分行的效果</p>

04-HTML5常用标签-HTML5极速入门

HTML超链接

HTML 文档使用超链接与网络上的另一个文档相连,如下所示:

<a href="https://blog.pangao.vip/">访问潘高陪你学编程</a>

04-HTML5常用标签-HTML5极速入门

如果想在新窗口打开文档,可以使用target 属性,如下所示:

<a href="https://blog.pangao.vip/" target="_blank">访问潘高陪你学编程</a>

HTML图片

HTML 文档中,图像由 <img> 标签定义。该标签只包含属性,并没有闭合标签。如下所示:

<img src="//inotgo.com/imagesLocal/202105/03/20210503033624901b_5.jpg" alt="潘高的头像">

04-HTML5常用标签-HTML5极速入门

源属性 src 的值是图像的 URL 地址。alt 属性用来为图像定义一串预备的可替换的文本,当图片获取失败时,就会显示该文本。

除此以外,可以使用 heightwidth 属性设置图像的高度与宽度,如下所示:

<img src="//inotgo.com/imagesLocal/202105/03/20210503033624901b_5.jpg" alt="潘高的头像" width="300" height="400">

HTML表格

表格由 <table> 标签来定义。每个表格均有若干行(由 <tr> 标签定义),每行被分割为若干单元格(由 <td> 标签定义)。数据单元格可以包含文本、图片、列表、段落、表单、水平线、表格等等。如下所示:

<table border="1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>

04-HTML5常用标签-HTML5极速入门

HTML列表

HTML 文档支持有序列表和无序列表,如下所示:

  • 有序列表<ol> <li>第一个序列</li> <li>第二个序列</li> <li>第三个序列</li> </ol>
  • 无序列表<ul> <li>这是序列</li> <li>这是序列</li> <li>这是序列</li> </ul>

HTML区块和内联

大多数 HTML 元素被定义为块级元素内联元素

  • 块级元素

块级元素在浏览器显示时,通常会以新行来开始和结束。例如: <h1>, <p>, <ul>, <table> 等。

这里介绍一个新的块级元素标签 <div>。她没有特定的含义,是组合其他 HTML 元素的容器。

  • 内联元素

内联元素在显示时通常不会以新行开始。

这里介绍一个新的内联元素标签 <span>。她也没有特定的含义,是文本的容器。





视频加载中...

版权声明
本文为[水中月牙]所创,转载请带上原文链接,感谢
https://www.seoxiehui.cn/article-318103-1.html

  1. HTML + CSS + JavaScript to achieve cool Fireworks (cloud like particle text 3D opening)
  2. HTML + CSS + JavaScript realizes 520 advertising love tree (including music), which is necessary for programmers to express themselves
  3. Solve the problem of Web front-end deployment server (it can be deployed online without a server)
  4. HTML + CSS + JS make wedding countdown web page template (520 / Tanabata Valentine's Day / programmer advertisement)
  5. What else can driverless minibus do besides "Park connection"?
  6. Cloud native leads the era of all cloud development
  7. NRM mirror source management tool
  8. Bring it to you, flex Jiugong
  9. Lolstyle UI component development practice (II) -- button group component
  10. Deconstruction assignment in ES6
  11. Luo 2 peerless Tang clan was officially launched. The official gave a key point, and the broadcast time was implied
  12. 20初识前端HTML(1)
  13. 当新零售遇上 Serverless
  14. 20 initial knowledge of front-end HTML (1)
  15. When new retail meets serverless
  16. [golang] - go into go language lesson 5 type conversion
  17. [golang] - go into go language lesson 6 conditional expression
  18. HTML5(八)——SVG 之 path 详解
  19. HTML5 (8) -- detailed explanation of SVG path
  20. 需要开通VIP以后页面内容才能复制怎么办?控制台禁用javascript即可
  21. Web前端|CSS入门教程(超详细的CSS使用讲解,适合前端初学者)
  22. 实践积累 —— 用Vue3简单写一个单行横向滚动组件
  23. Serverless 全能选手,再下一城
  24. What if you need to open a VIP to copy the page content? Just disable JavaScript on the console
  25. Web front end | CSS introductory tutorial (super detailed CSS explanation, suitable for front-end beginners)
  26. Practice accumulation - write a single line horizontal scroll component simply with vue3
  27. Dili Reba is thin again. She looks elegant and high in a strapless hollow skirt, and her "palm waist" is beautiful to a new height
  28. Serverless all-round player, next city
  29. The difference between MySQL semi synchronous replication and lossless semi synchronous replication
  30. Vue表单设计器的终极解决方案
  31. The ultimate solution for Vue form designer
  32. Nginx从理论到实践超详细笔记
  33. Yu Shuxin's red backless swimsuit is split to the waist and tail, with a concave convex figure and excessive color matching, and his face is white to dazzling
  34. Nginx ultra detailed notes from theory to practice
  35. 【动画消消乐|CSS】086.炫酷水波浪Loading过渡动画
  36. typecho全站启用https
  37. CCTV has another popular employee. The off-site interpretation is very professional, and the appearance ability is no less than that of Wang Bingbing
  38. [animation Xiaole | CSS] 086. Cool water wave loading transition animation
  39. Enable HTTPS in Typecho
  40. 50天用JavaScript完成50个web项目,我学到了什么?
  41. 根据JavaScript中原生的XMLHttpRequest实现jQuery的Ajax
  42. What have I learned from completing 50 web projects with JavaScript in 50 days?
  43. "My neighbor doesn't grow up" has hit the whole network. There are countless horse music circles, and actor Zhou Xiaochuan has successfully made a circle
  44. 根据JavaScript中原生的XMLHttpRequest实现jQuery的Ajax
  45. Implement the Ajax of jQuery according to the native XMLHttpRequest in JavaScript
  46. Implement the Ajax of jQuery according to the native XMLHttpRequest in JavaScript
  47. 30 + women still wear less T-shirts and jeans. If they wear them like stars, they will lose weight
  48. 数栈技术分享前端篇:TS,看你哪里逃~
  49. Several stack technology sharing front end: TS, see where you escape~
  50. 舍弃Kong和Nginx,Apache APISIX 在趣链科技 BaaS 平台的落地实践
  51. Abandon the landing practice of Kong and nginx, Apache apisik on the baas platform of fun chain technology
  52. 浪迹天涯king教你用elementui做复杂的表格,去处理报表数据(合并表头,合并表体行和列)
  53. 前端HTML两万字图文大总结,快来看看你会多少!【️熬夜整理&建议收藏️】
  54. Wandering around the world king teaches you to use elementui to make complex tables and process report data (merge header, merge table body rows and columns)
  55. 路由刷新数据丢失 - vuex数据读取的问题
  56. Front end HTML 20000 word graphic summary, come and see how much you can【 Stay up late to sort out & suggestions]
  57. Route refresh data loss - vuex data reading problem
  58. Systemctl系统启动Nginx服务脚本
  59. Systemctl system startup nginx service script
  60. sleepless