HTML common tags (for personal use, may not be rigorous, do not blame)

Source: Internet
Author: User
Tags id3

The HTML tags ' < ' and ' > ' are occupied by default, and if you want to display these symbols, you need to use special characters to implement
' < ': using &LT to achieve
' > ': Using &GT to achieve
Space: More space in the HTML by default also shows only one, in order to display more than one space, you can use to implement, a one to represent a space
<div>&lt;div&gt;&nbsp</div>

line break:<br/>

Link: target= ' _blank ' means when opening a link with a new page
 <a href= ' http://www.baidu.com ' target= ' _blank ' > Baidu </a> 


links In addition to being able to jump to outside addresses, You can also jump within the page
jump to the specified ID, using the #id name
to jump to the specified class, using the. Class name

Directory:
<div>
<a href= ' #id1 ' > First chapter </a>
<a href= ' #id2 ' > Chapter two </a>
<a href= ' #id3 ' & gt; Chapter </a>
</div>
Content
<div id= ' ID1 ' > First chapter </div>
<div id= ' Id2 ' > Chapter II Content < /div>
<div id= ' ID3 ' > third chapter Content </div>


title tag: H1-h6


selection box: selected= ' selected ' means the option selected by default
<select>
<option value= ' 1 ' > Shanghai </option>
<option value= ' 2 ' > Beijing </option>
<option value= ' 3 ' selected= ' selected ' > Guangzhou </option>
</select>

Size: Set drop-down box big down
<select size= ' 4 ' >
<option> Shanghai </option>
<option> Beijing </option>
<option> Guangzhou </option>
</select>

Multiple choice: multiple= ' multiple '
<select size= ' 3 ' multiple= ' multiple ' >
<option> Shanghai </option>
<option> Beijing </option>
<option> Guangzhou </option>
</select>

Option group: <optgroup label= ' xxx ' ></optgroup>
<select>
<optgroup label= ' Hubei province ' >
<option> Wuhan </option>
<option> Xiangyang </option>
<option> Yichang </option>
</optgroup>
<optgroup label= ' Guangdong province ' >
<option> Guangzhou </option>
<option> Shenzhen </option>
<option> Dongguan </option>
</optgroup>
</select>





text box:
<input type= ' text ' maxlength= ' 3 '/>

Password Box:
<input type= ' password '/>

check box:
<input type= ' checkbox '/>
<input type= ' checkbox '/>
<input type= ' checkbox '/>

Radio Box:
<input type= ' radio ' name= ' sex '/>
<input type= ' radio ' name= ' sex '/>
<input type= ' radio ' name= ' sex '/>

button:
<input type= ' button ' value= ' buttons '/>

Submit:
<input type= ' Submit '/>
<br/>

<input type= ' file '/>

Multiline text box:
<textarea></textarea>

form:
<form action= '/' method= ' POST ' >
Name:&nbsp;&nbsp;<input name= ' username '/><br/>
Password:<input name= ' Password ' type= ' Password '/><br/>
<input type= ' Submit '/>
</form>


Click ' Name ' to get the cursor for the text box:

<label for= ' name ' > name: <input id= ' name '/></label>


unordered list:
<ul>
<li>hello</li>
<li>oh</li>
<li>god</li>
</ul>

There are sequence tables:
<ol>
<li>apple</li>
<li>bike</li>
<li>shoes</li>
</ol>


table: tr: line td: Column th: Title
<table border= ' 1 ' >
<tr>
<th>IP</th>
<th>IDC</th>
<th>Status</th>
</tr>

<tr>
<td>192.168.1.2</td>
<td> Beijing </td>
<td>Online</td>
</tr>
<tr>
<td>192.168.1.2</td>
<td> Beijing </td>
<td>Online</td>
</tr>
</table>

table: border: Border colspan: Merging columns rowspan: Merging rows
<table border= ' 1 ' >
<tr>
<th>IP</th>
<th>IDC</th>
<th>Status</th>
</tr>

<tr>
&LT;TD colspan= ' 2 ' >192.168.1.2</td>
&LT;TD rowspan= ' 2 ' >Online</td>
</tr>
<tr>
<td>192.168.1.2</td>
<td> Beijing </td>
</tr>
</table>

Package A portion of the form's content to generate a field for a set of related forms:
<fieldset>
<legend> Login </legend>
<p> User name:</p>
<p> Password:</p>
</fieldset>

HTML common tags (for personal use, may not be rigorous, do not blame)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.