Some of the most often used tags of HTML. And it’s also a record of learning process.
Title
1 2 3 4
<h1> Title </h1> <h2> Title </h2> ... <h7> Title </h7>
Horizontal Line
1
<hr>
Comments
1
<!-- here are the comments -->
Passage
1
<p> This a passage </p>
New Line
1
<br>
Format
Bold
1
<b> This is bold </b>
Italic
1
<i> This is italic </i>
Computer readable
1
<code> print("this is code\n"); </code>
Superscript and Subscript
1 2
H<sub>2</sub>O 10<sup>5</sup>
Link
1
<ahref="url">link text</a>
Head
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<head> <title> title of the doc </title> <!-- this is the default link of this page --> <basehref="url"target="_blank"> <!-- the relationship with outer resource --> <linkrel="filename"type="text/css"href="dir"> <!-- the styles of this page --> <styletype="text/css"> h { color: pink } </style> <!-- basic element of this page --> <metaname="keywords"content="o_oyao, blog"> <metaname="description"content="The blog of o_oyao"> <mataname="author"content="o_oyao"> <metahttp-equiv="refresh"content="60"> <metacharset="UTF-8"> </head>
Image
1
<imgsrc="url"alt="description of the picture"width="10"height="10">
<ul> <li>o_oyao's blog is great</li> <li>o_oyao's article is easy to understand</li> <li>o_oyao's content is usable</li> </ul>
Ordered list
1 2 3 4 5
<ol> <li>Open o_oyao's blog</li> <li>Click one article</li> <li>Leave a comment below</li> </ol>
Customize list
1 2 3 4 5 6
<dl> <dt>o_oyao's blog</dt> <dd>- Awesome and great</dd> <dt>o_oyao's content</dt> <dd>- Easy and fun</dd> </dl>
Block
1 2 3 4 5 6 7 8 9 10 11
<div> <!-- tags that starts a new line itself --> <h2></h2> <p></p> <ul></ul> <table></table> </div> <spam> <!-- tags that won't starts a new line --> <b></b>,<td></td>,<a></a>,<img> </spam>
Form
1 2 3 4 5 6 7 8 9 10 11 12
<formname="input"action="xx.php"method="get"> name: <inputtype="text"name="username"><br> password: <inputtype="password"name="pwd"> <!-- radio buttons --> <inputtype="radio"name="blog"value="o_oyao's blog is awesome"><br> <inputtype="radio"name="blog"value="o_oyao's blog is fantastic"> <!-- checkboxed --> <inputtype="checkbox"name="content"value="I like this blog"> <inputtype="checkbox"name="content"value="I'll follow this blog"> <!-- Submit Button --> <inputtype="submit"value="Submit"> </form>