html_3

html_3

主要是学习body中的元素,包括但不限于h元素等学习

refer

  1. html mdn
    https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals

P和H

我们经常会使用p元素和h元素进行文章的书写,例子如下:

<h1>The Crushing Bore</h1>

<p>By Chris Mills</p>

<h2>Chapter 1: The dark night</h2>

<p>It was a dark night. Somewhere, an owl hooted. The rain lashed down on the ...</p>

<h2>Chapter 2: The eternal silence</h2>

<p>Our protagonist could not so much as a whisper out of the shadowy figure ...</p>

<h3>The specter speaks</h3>

<p>Several more hours had passed, when all of a sudden the specter sat bolt upright and exclaimed, "Please have mercy on my soul!"</p>

span元素

无实意,例子如下:

<span style="font-size: 32px; margin: 21px 0; display: block;">Is this a top level heading?</span>

ul元素和ol元素

list有两种,分别是无序unordered和有序ordered的,其中无序的是不会标记1,2,3,4等,而有序的会标记1,2,3,4等

使用ul(unodered list)元素完成无序,使用ol完成有序,例子如下

<p>unordered</p>
<ul>
<li>milk</li>
<li>eggs</li>
<li>bread</li>
<li>hummus</li>
</ul>

<p>ordered</p>
<ol>
  <li>Drive to the end of the road</li>
  <li>Turn right</li>
  <li>Go straight across the first two roundabouts</li>
  <li>Turn left at the third roundabout</li>
  <li>The school is on your right, 300 meters up the road</li>
</ol>

em元素

em元素用于嵌套在p元素中,完成对某一段文字的倾斜工作。例子如下:

<p>I am <em>glad</em> you weren't <em>late</em>.</p>

strong元素

strong元素用于嵌套在p元素中,完成对某一段文字重点突出的工作,例子如下:

<p>This liquid is <strong>highly toxic</strong>.</p>

<p>I am counting on you. <strong>Do not</strong> be late!</p>

html5

html5的元素使用会大相径庭

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值