HTML Basic Tags

Source: Internet
Author: User

The purpose of the label : when we learn how to make Web pages, we often hear a word that is semantically semantic . So what is called semantic, the popular point is: understand the purpose of each label (under what circumstances I can use this label is reasonable) For example, the title of the article on the page can be used as a title tag, the column name of each column on the page can also use the title tag. The paragraph in the article should be placed in the paragraph label , in the article has the want to emphasize the text, you can use the EM tag to express emphasis and so on.

So much semantics, but what kind of benefits do we get from semantics?

1. More easily indexed by search engines.

2. It is easier for screen readers to read the page content.

<body> content displayed on the Web page

<p> Paragraph label, blank after paragraph

Title, a total of six levels of title, H1 level highest

<strong> and <em> em are emphasized, strong expresses a stronger emphasis, the default EM is italic, strong is bold

<span> This tag has no semantics, in order to add a separate style to the content

<q> Short text references, default with double quotes, semantics refer to other people's words

<blockquote> Long text references, default and forward indent

<br> xhtml1.0, <br/>,html4.01 writing <br>

Space

Horizontal line, xhtml1.0

<address> address, the default style is italic

<code> Single-line program code

<pre> Multi-line program code that preserves spaces and returns

<ul> and <li> unordered list, default Li with small dots in front

<ol> and <li> ordered list, default Li sequence number starting from 1

<div> Separate logical part of a Web page, equivalent to a container

<table> Table labels. It contains <tbody>,<tr>,<th>,<td>. After adding the tbody, the contents of the table will be downloaded before they are displayed. TR, one row of the table. TD, a table of cells, there are several TD there are several columns. Th, table header cell. The default table does not have a table line, and the header is bold and centered

<caption> Add a table title

<summary> Add a table summary, the browser does not display, the purpose is to increase the semantics of the table

<a> Hyperlinks, the href attribute is the destination URL, the Title property is the text that is displayed when the mouse hovers over the hyperlink, adds semantics, and the attribute target= "_blank" can open the hyperlink in the New tab, and the default hyperlink is blue. href= "Mailto:[email protected]" will link email address

picture label, SRC identifies the position of the image, alt when the picture display is not successful is the text that the mouse slides over the picture, the title mouse is displayed in the text

<form> form labels. method is the data transfer method Get/post,action value is the server file

<input> type= "text", the input box is a text input box, type= "password", the input box is the password input box. Name is the input box name, value is the input box default value

<textarea> Text field, multiline text input, rows input field, cols number of input fields, rows and cols can be replaced with CSS width and height

<input> type= "Radio" is a radio box, type= "checkbox" is a check box. Name is the name of the control, value is the values submitted to the server, and when checked= "checked", the option is selected by default. The name of the radio button of the same group must be the same, in order to play the role of radio

<select> and <option> drop-down list box, where the option tag is a drop-down list box options, the Value property of option is the values submitted to the server when checked= "checked", option is selected by default. When the properties of the Select tag multiple= "Multiple", the drop-down list box becomes multi-select

<input> type= "Submit", is the submit button, value is the text displayed on the button. Type= "Reset" is the reset button

<label> Label labels do not present any special effects to the user, and when the user clicks the label label, the browser automatically shifts focus to the label-related form controls. The value of the For property is the same as the ID property of the associated control

HTML Basic Tags

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.