Common html tags and html tags

Source: Internet
Author: User

Common html tags and html tags

---------------------------------- Html overview ------------------------------------------------

1. the html language is composed of tags, and data is encapsulated in tags, because the encapsulated data can be operated by changing the attribute values in tags.

2. <Html>
<Head> <Body> </body>
</Html>

3. Tag features: For Data encapsulation, there are start labels and end labels, but some labels only reflect a single function,

Therefore, you do not need to end the tag, such as <br/> 4. Tag format: <Tag Name attribute name = "attribute value"> data </Tag Name>
<Tag Name property name = "property value"/>
--------------------------------- Common labels --------------------------------------------------
1. font: <font>
<Font size = "7" color = "# ffff00"> data </font>
Special Part: If you want to display some special symbols on the page, escape them.
<: & Lt; >:& gt; &: & amp; space: & nbsp;
2. List tags <dl> </dl>
Upper-level project: <dt>
Lower-level project: <dd>
Symbol label: <ul> unsigned, <ol> signed. The list items of the two tags are encapsulated by the <li> label.
3. Image Tag:

4. table labels: <table>
A table consists of rows, and rows are composed of cells. By default, a tbody tag is displayed in the table.
Title Tag: <caption>
<Table border = "1" bordercolor = "red" width = "60%" cellpadding = "10" cellspacing = "0">
<Tr>
<Th> </th>
<Th> </th>
</Tr>
<Tr>
<Td> </td>
<Td> </td>
</Tr>
</Table>
A table is the most common label used to format data.
5. hyperlink: <a>
I: <a href = "http://www.sina.com.cn" target = "_ blank"> Sina website </a>
After being clicked, the engine will start the corresponding parsing program to search for the specified host,
First, find the hosts file of the local host. If the corresponding IP address of the host is not found, go to the Internet DNS server to find the corresponding IP address.
Ii: <a href = "mailto: abc@sohu.com? Subject = haha & cc = qq@163.com "> Contact Us </a>
When you click a hyperlink, a resolution program associated with the email will appear. The default value of this machine is outlook.
Iii: positioning mark
<A name = "top"> top position </a>
<A href = "# top"> jump to the top position </a>

6. form Tag: <form> the tag can interact with the server.

Form components usually need to define the name and value attributes, because data needs to be sent to the server,
The server can obtain the submitted data separately only when the value of this name is known.

Elements in form labels:

1, <input>: The corresponding components of the tag vary depending on the type attribute value.
Type attribute:
1. text: text box. The input text is visible.
2. password: The password box. The entered text is invisible.
3. radio: single region. To be selected, you must define an attribute name for a single region. When there are multiple single regions, only one of them can be selected, the names of these single orders must be the same.
4. checkbox: Check box. When multiple data items are selected at the same time.
5. file: a component that can be selected for a file. It is usually used for attachment or file upload.
6. hidden: Hide the component. The component is no longer displayed on the page, but its defined name and value can be submitted to the server.
7. button: button component. By default, a Custom button has no effect. You can register an event and add a custom effect.
8. reset: Click the reset button to restore the effect of operations in the component to the initial state.
9. submit: Click the submit button to submit the data added in the component to the specified destination.
10. image: image component. To avoid the difficulty of the submit button, you can connect a nice button image through the src attribute of the image to complete the submission.
, 2. drop-down menu: <select>
Each drop-down menu is encapsulated by option.
<Select>
<Option> </option>
</Select>
, 3, text area: <textarea>

Multiple rows of input can be displayed.

Common attributes in form labels:
Action: Specifies the data submission destination. method: submission method. Two common values: get and post. get is the default value.
Difference between get and post:
Get: displays the submitted data in the address bar.
The volume of submitted data is limited by the address bar.
Sensitive information is insecure.
The submission information is encapsulated in the request line, that is, before the http message header.
Post: opposite to get

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.