HTML developmen...login
HTML development manual
author:php.cn  update time:2022-04-11 17:45:33

HTML cheat list



HTML Cheat List. You can print it for daily use.


HTML Basic Document

Example

<!DOCTYPE html>
<html>
<head>
<title>文档标题</title>
</head>
<body>
可见文本...
</body>
</html>
Click the "Run Example" button to view the online example

Basic Tags

<h1>The largest title</h1>
<h2> . . . </h2>
< h3> . . . </h3>
<h4> . . . </h4>
<h5> . . . </h5>
<h6>The smallest title </h6>

<p>This is a paragraph. </p>
<br> (Line break)
<hr> (Horizontal line)
<!-- This is a comment -->

Text Formatting

<b>Bold text</b>
<code>Computer code</code>
<em>Emphasis text< ;/em>
<i>italic text</i>
<kbd>Keyboard input</kbd>
<pre>Preformatted text</pre>
<small>Smaller text</small>
<strong>Important text</strong>

<abbr> (Abbreviation)
<address> ( Contact information)
<bdo> (text direction)
<blockquote> (section quoted from another source)
<cite> (title of work)
<del> ( Deleted text)
<ins> (Inserted text)
<sub> (Subscript text)
<sup> (Superscript text)

Link (Links)

Normal links: <a href="http://www.example.com/">Link text</a>
Image links: < a href="http://www.example.com/"><img src="URL" alt="Replacement text"></a>
Email link: <a href=" mailto:webmaster@example.com">Send e-mail</a>

Bookmark:
<a id="tips">Tips section</a>
< ;a href="#tips">Skip to tips</a>

Pictures

<img src="URL" alt ="replacement text" height="42" width="42">

Styles/Sections

##
<style type="text/css">
  h1 {color:red;}
  p {color:blue;}
</style>
<div>Block-level elements in the document</div>
<span>Inline elements in the document< ;/span>
Unordered list

<ul>
  <li>项目</li>
  <li>项目</li>
</ul>
Ordered list

<ol>
  <li>第一项</li>
  <li>第二项</li>
</ol>
Definition list

<dl>
  <dt>项目 1</dt>
    <dd>描述项目 1</dd>
  <dt>项目 2</dt>
    <dd>描述项目 2</dd>
</dl>
Tables

<table border="1">
  <tr>
      <th>表格标题</th>
      <th>表格标题</th>
  </tr>
  <tr>
      <td>表格数据</td>
      <td>表格数据</td>
  </tr>
</table>
Frame(Iframe)

<iframe src="demo_iframe.htm"></iframe>
Forms

<form action="demo_form.php" method="post/get">
<input type="text" name="email" size="40" maxlength="50">
<input type="password">
<input type="checkbox" checked="checked">
<input type="radio" checked="checked">
<input type="submit" value="Send">
<input type="reset">
<input type="hidden">
<select>
<option>苹果</option>
<option selected="selected">香蕉</option>
<option>樱桃</option>
</select>
<textarea name="comment" rows="60" cols="20"></textarea>
</form>
Entities )

< is equivalent to <
> is equivalent to >
© is equivalent to ©