A complete list of commonly used HTML tags and their characteristics

A complete list of commonly used HTML tags and their characteristics

First of all, you need to know some characteristics of HTML tags:

1. Similar to "<keyword>", which consists of keywords enclosed in angle brackets, such as <html>, <div>...

2. They usually appear in pairs, starting with a start tag like "<div>element content</div>", the left tag is called the start tag, and the right </> is called the end tag, with a beginning and an end, except for some individual single closing tags.

First, let's remember some individual exceptions to single closing tags, for example:

<meta /> Set page information <param /> Can provide parameters to the <object> or <applet> that contains it
<br /> Line Break <keygen /> Define the generated key
<hr /> Horizontal Line <source /> Defines the media source for a media element (such as <video> or <audio>)
<area /> Image display area <col /> Defines property values ​​for one or more columns in a table
<input /> Form elements, different input fields of type have different forms <frame /> Defines a specific window (frame) in a frameset
<link /> Linking Style Sheets <embed /> Define embedded content, such as plugins
<basefont /> Defines the base font. HTML5 does not support the <basefont> tag and is not recommended. ......

The following tags are classified according to different effects:

1. Font Effects

<h1>…</h1> The font size of heading 1 (largest) decreases as the level goes down. Generally, the font size of headings starts from h1 to h4. The font size after h4 is not used. <s>…</s> Strikethrough
<h6>…</h6> Heading 6 (minimum) <del>…</del> Strikethrough (indicates deletion)
<b>…</b> Bold <kbd>…</kbd> Keyboard text
<strong>..</strong> Bold (emphasized) <tt>…</tt> Type font
<i>…</i> Italic characters <xmp>…</xmp> Fixed-width font (blank, line break, and positioning functions are valid in the file)
Italic (emphasis) <plaintext>…</plaintext> Fixed width font (no markup)
<dfn>...</dfn> Italic words (definition) <listing>…</listing> Fixed width small font
<u>…</u> Bottom Line <font color=00ff00>…</font> Font color (color="#00ff00" is also acceptable)
<ins>...</ins> Underline (indicates inserted text) <font size=1>…</font> Minimum font size
<strike>…</strike> Horizontal line <font style=font-size:100 px></font> Infinitely increase (font size is 100px)

2. Disconnection Mark

<hr /> Horizontal Line <nobr>…</nobr> No Break
<hr size=9 /> Horizontal line (set size) <p>…</p> paragraph
<hr width=80% /> Horizontal line (set width) <center>…</center> Center the text it surrounds
<hr color=00ff00 /> Horizontal line (set color)
<br /> Line Break

3. Links

<base href=address> Specifies a default address or default target for all links on a page <a href=Addresstarget=_top></a> Specify the URL of the hyperlink target (full window link)
<a href=Address></a> Specifies the URL of the hyperlink target <a href=addresstarget=page frame name></a> Specifies the URL of the hyperlink target (linked in the specified page frame)
<a href=Addresstarget=_blank></a> Specify the URL of the hyperlink target (open a new window)

4. Image/Music

<img src=image address/> Posting pictures to a web page <img src=image addressborder=1 /> Set the picture border of the sticker
<img src=image addresswidth=180 /> Set the width of the image to be pasted <bgsound src=MID music file address/> Background music setting
<img src=image address height=30 /> Set the height of the image to be pasted

5. Table

<table aling=left>…</table> Table position, left <table cellpadding=parameter>…</table> Specify the distance between grid lines (using numbers)
<table aling=center>…</table> Position of the table, center <table cols=parameters>…</table> Specify the number of columns in the table
<table background=image path>…</table> Background image URL = is the path URL <table frame=parameter>…</table> Set the display mode of the table outer border line
<table border=border size>…</table> Set table border size (using numbers) <table width=width>…</table> Specify table width (using numbers)
<table bgcolor=color code>…</table> Set the background color of the table <table height=height>…</table> Specify the table height (using a number)
<table bordercolor=color code>…</table> Set the table border color <td colspan=parameter>…</td> Specify the number of columns to merge into a cell (use a number)
<table bordercolordark=color code>…</table> Set the color of the table's dark border <td rowspan=parameter>…</td> Specify the number of columns to merge cells into (using a number)
<table bordercolorlight=color code>…</table> Set the color of the table's bright border

6. Split Window

<frameset col="20%",*> Split left and right, split the left frame into 20% and the browser will automatically adjust the size of the right frame <comment>…</comment> Add comments
<frameset rows="20%,*"> Split the upper frame into 20% and the browser will automatically adjust the size of the lower frame. <dd>…</dd> Sets the item description of the definition list
<frameset cols=”20%,*”> Split the left and right frames <dfn>…</dfn> Display "Define" text
<frameset cols=”20%,*,20%”> Split the left, middle and right frames <dir>…</dir> List Text Label
<frameset rows="20%,*,20%"> Split the upper, middle and lower frames <dl>…</dl> Set the label of the definition list
<!--…--> annotation <dt>...</dt> Define the items in the list
<a href target> Specify the split window for the hyperlink <em>…</em> For emphasis
<a href="#anchor name> Hyperlink with specified anchor name <font face> Arbitrary specification of the fonts used
<a href> Specify a hyperlink <font size> Set font size
<a name=name of the anchor> The name of the connected point <form action> settings
<address>…</address> Used to display email addresses
<b>…</b> Bold
<base target> Specify the split window for the hyperlink
<bgsound src> Add background music
<big>…</big> Display large fonts
<blink> Display blinking strings or text (not supported by IE)
<body text link vlink> Set text color
<body>…</body> Show this article
<br /> Line Break
<capition align> Set table title position
<caption>…</caption> Add a title to the table
<center>…</center> Center the enclosed text. HTML5 does not support this tag.
<cite>…<cite> Text used to quote scriptures
<code>…</code> Used to list a program code

<<:  Docker installation and configuration steps for RabbitMQ

>>:  HTML+jQuery to implement a simple login page

Recommend

Web interview Vue custom components and calling methods

Import: Due to project requirements, we will enca...

Avoiding Problems Caused by Closures in JavaScript

About let to avoid problems caused by closure Use...

Win10 + Ubuntu 16.04 dual system perfect installation tutorial [detailed]

Be sure to remember to back up your data, it is p...

Introduction to using Unicode characters in web pages (&#,\u, etc.)

The earliest computers could only use ASCII chara...

Example of how to set WordPress pseudo-static in Nginx

Quoting Baidu's explanation of pseudo-static:...

CSS perfectly solves the problem of front-end image deformation

I saw an article in Toutiao IT School that CSS pe...

Specific use of Linux gcc command

01. Command Overview The gcc command uses the C/C...

Vue implements left and right sliding effect example code

Preface The effect problems used in personal actu...

Summary of front-end knowledge in the Gokudō game

background In the early stages of learning Japane...

How to clean up the disk space occupied by Docker

Docker takes up a lot of space. Whenever we run c...

Detailed example of how to implement transaction commit and rollback in mysql

Recently, we need to perform a scheduled migratio...