Common html tags and html tags

Source: Internet
Author: User

Common html tags and html tags

List common html tags and their usage!

Tag Name Definition and usage Introduction Tag type Html/html5

<! DOCTYPE>

 

<! DOCTYPE> Declaration must be the first line of the HTML document, located before the

Define Document Type   Html/html5

<Head>

 

<Head> the tag is placed at the beginning of the document, followed by

<Head> A label is used to define the header of a document. It is a container for all header elements.

. You can introduce scripts and css styles in

<Head> available labels include <link>, <meta>

, <Script>, <title>, <style>.

  Html

<Header>

 

When we define a div
5 previously, a div was generally defined,
For example, <div class = "head"> </d
Iv>. When html5 appears
Define tags, and the selector directly writes Der>
Define the header (description) of the document ).
 
  Html5

<Body>

 

The body element defines the subject of the document.
Tags can only be used or appear once in HTML,
What we usually see in the browser content area
, All are placed between <body> </body>,
Body Tag is an important and indispensable Tag Element in html.
Body is the most important tag in the html webpage structure, also called the subject
Content tag. Generally, webpage content is placed between the tag groups.
Block-level elements
Html

<Div>

 

<Div> is a block-level element whose content is full
You can add
Class and id to operate its CSS style
Div is one of the html tags. div has the function of separating content,
The div and CSS styles allow the webpage to achieve various style effects.
Block-level elements
Html

<Center>

 

The text contained in the table is horizontally centered.
<Nnter> text </center>
Used to horizontally center the text in the <center> label
Block-level elements Html, not html5

 

Pay attention to the structure when using the image. The image path is correct and the width is
And the height is set based on actual needs.
We usually use CSS styles for image img
Tag width, height, css,
Border settings
Img tagIn html, external images are imported to the webpage for display.
Label.

Intra-row block elements

(Inline element)

Html

Ul

 

<Ul>

<Li> </li>

<Li> </li>

<Li> </li>

</Ul>

The preceding three li label groups are placed between ul labels. Here

Html ul li unordered list layout and ol li ordered list

The layout syntax is the same as the structure.

When CSS styles are started, the sequence number list is displayed.

(Orders 1, 2, 3, 4; I, II, III

. Whether there is

The sequential ol li list is still an unordered ul li list.

You need to reset the CSS style to use the layout.

It is generally used for title and navigation layout and layout.

After CSS styles, various regular page la s can be implemented.

Bureau.

Block-level elements Html

<H1>-

 

<H1> This is the title 

<H1>-

Define the largest title. <H6> define the smallest title.

You can use the h1 h2 h3 h4 tag in a webpage,

Highlights the important part of the page. h5 and h6 are generally used for page

Subject content

Block-level elements Html

<Nav>

 

<Nav> </nav> is a new tag in html5.
We have always been used
<Div id = "nav"> or <ul id = "nav">
Such code is used to write the page navigation;
In HTML5, we can directly list the navigation links
Put it in the <nav> label:

Similar to

Only a tag that enhances semantics.

Intra-row block elements Html5

<Span>

 

<Span> content </span>, usually a pair
Set the span of any style, and the height and width are adaptive content,
The tag occupies a long distance.

The layout labels commonly used by span in html are different from div labels.

That is, span occupies high-width space with the content

(Closely following the content), while a pair of div labels occupy a row

Line Element Html

<A>

 

<A href = "the address you need" target = "">
This is a hyperlink </a> href attribute: indicates a hyperlink
The page to jump. Target attribute: Set new
Position of the window opened on the page

<A> label definition hyperlink, used to link from a page

Another page.

Line Element Html

<Form>

 

<Form action = "redirected page" method =
"Post"> </form>

Form is a form area label, which usually contains the input box.

, Single-choice, multiple-choice, multi-line text box,Drop-down menu and other tables

The content of a ticket. Enter the form action value in the form.

The address of the sent page.

  Html

22:41:19, January 1, January 2, 2018. This is what we wrote today. Continue tomorrow !!!

 

Related Article

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.