HTMLï¼è¶ æåæ¨è¨èªè¨, Hypertext Markup Languageï¼å ç´ é常çºãåå¡ç´ãå ç´ ææ¯ãè¡å §ç´ãå ç´ ãä¸ååå¡ç´å ç´ æèç±å»ºç«ãåå¡ãçåä½ï¼å®å ¨ä½æ»¿å ¶ç¶å ç´ ï¼å®¹å¨ï¼ç空éãæ¬æå°çºä½ 說æå ¶ææ¶µ.
ç覽å¨é è¨ä»¥å¨å ç´ å徿è¡çæ¹å¼ï¼è¡¨ç¾åå¡ç´å ç´ ãè¦è¦ºä¸æåç¾çºä¸æç¸±åå ççæ¹å¡ã
åè¨»ï¼ åå¡ç´å ç´ å¿ å®ä»¥æè¡æ¹å¼ï¼åå¾å®æ´å¯¬åº¦ç空éï¼åå·¦å³å ©å´åå¯è½å°å»¶ä¼¸åºå»ï¼ã
以ä¸ç¯ä¾å°å±ç¤ºåå¡ç´å ç´ çå½±é¿ï¼
åå¡ç´å ç´ HTML<p>
This paragraph is a block-level element; its background has been colored to
display the paragraph's parent element.
</p>
CSS
p {
background-color: #8abb55;
}
ç¨æ³
<body>
å
ç´ ä¹å
§ãThere are a couple of key differences between block-level elements and inline elements:
By default, block-level elements begin on new lines, but inline elements can start anywhere in a line.
Generally, block-level elements may contain inline elements and other block-level elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.
The distinction of block-level vs. inline elements is used in HTML specifications up to 4.01. In HTML5, this binary distinction is replaced with a more complex set of content categories. The "block-level" category roughly corresponds to the category of flow content in HTML5, while "inline" corresponds to phrasing content, but there are additional categories.
ç¸éå ç´The following is a complete list of all HTML block level elements (although "block-level" is not technically defined for elements that are new in HTML5).
<address>
Contact information.
<article>
Article content.
<aside>
Aside content.
<blockquote>
Long ("block") quotation.
<dialog>
Dialog box.
<dd>
Describes a term in a description list.
<div>
Document division.
<dl>
Description list.
<dt>
Description list term.
<fieldset>
Field set label.
<figcaption>
Figure caption.
<figure>
Groups media content with a caption (see <figcaption>
).
Section or page footer.
<form>
Input form.
<h1>
, <h2>
, <h3>
, <h4>
, <h5>
, <h6>
Heading levels 1-6.
Section or page header.
<hgroup>
Groups header information.
<hr>
Horizontal rule (dividing line).
<li>
List item.
<main>
Contains the central content unique to this document.
<nav>
Contains navigation links.
<ol>
Ordered list.
<p>
Paragraph.
<pre>
Preformatted text.
<section>
Section of a web page.
<table>
Table.
<ul>
Unordered list.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4