Getting Started with HTML

Source: Internet
Author: User
Tags closing tag html header

1. Introduction to HTML

HTML (hypertext Markup Language), or Hypertext Markup Language, is a markup language used to describe a Web page document.

HTML tag tags are often referred to as HTML tags (html tag). HTML provides a number of tags, such as paragraph marks, title tags, hyperlink tags, picture tags, and so on, what needs to be defined in the Web page, the corresponding HTML tag description.

2. HTML structure
1 <!DOCTYPE HTML><!--represents the HTML5 document Protocol Declaration label, which affects how the entire page is displayed, depending on the protocol -2 <HTML><!-- -3 <Head><!--The  -4     <MetaCharSet= "UTF-8">5     <!--This is a comment that is not displayed on the page, and the contents of the comment are written between the symbols -6     <title>First HTML file</title><!--<title> represents the title of the document -7 </Head>8 9 <Body><!--<body> Tags for what we see in the browser -Ten First HTML file One </Body>  A </HTML>

The contents of the note are written between the <!--and the symbol , which works in the browser as follows

3. HTML Header tag 3.1, <! Doctype> Mark

<! The doctype> tag is at the very front of the document and is used to explain to the browser which HTML or XHTML standard specification is used by the current document. Used primarily for browser parsing of document labels.

<! Doctype> tags are related to browser compatibility if you delete <! Doctype>, it means letting the browser display the contents of the HTML page. At this time, ie6,ie7,ie8,firefox2,firefox3,chrome, how many kinds of browsers, the page is likely to have how many kinds of display effect, this is not allowed.

3.2.


3.3.

The the contents of the head tag definition are provided only to the browser, not to the user's rendering. It is mainly used to encapsulate other tags located at the head of the document, such as <title>, <meta>, <link> and <style>, to describe the document's title, author, and relationships with other documents. an HTML document can contain only a pair of , and most of the data contained in the header of the document will not actually appear on the page as content.

3.4. <meta> Mark

The <meta> tag provides meta-information about the page (meta-information), such as descriptions and keywords for search engines and update frequency.

The <meta> tag is located in the header of the document and does not contain any content. The properties of the <meta> tag define the name/value pairs associated with the document. Such as:

<name= "keywords"  content= "Html,asp,php,sql"> 

"keywords" is a name that is often used. It defines a set of keywords for a document. Some search engines use these keywords to categorize documents when they encounter these keywords.

3.5. <title> Mark

The <title> tag is used to define the title of the HTML page, which takes a name to the page and must be within the

< title > page title name </title>

Title tag for website SEO is very important, the title of good or bad directly affect the site SEO.

3.6. <link> Mark

The most common use of <link> tags is to link external CSS files,

<rel= "stylesheet"  type= "text/css"  href= " Theme.css "/>

It can also be used to introduce the icon of a website

<rel= "shortcut icon"  href= "Http://www.baidu.com/favicon.ico"  />

4. HTML Content label 4.1, title tag

The caption label is represented by title tags are used to reflect the importance of the content of the document , not just to produce bold or large text and use the title.

  

Note: The browser automatically adds a blank line before and after the title.

4.2. Paragraph label

The paragraphs are defined by the <p> tag, and the P tags do not share a single row with each other, and are exclusive of one or more rows of space.

4.3. Horizontal line Marking

The HR tag indicates that a horizontal line is inserted into the page, thehr tag is a single label , and no closing tag is required.

    

4.4. Wrapping Labels

<br> can insert a simple line break and also a single label , without the need to close the label.

  

4.5. Span Label

The <span> tag is used to combine inline elements in a document, and a span tag can share a row with other span tags. Typically, you need to apply a style to a span tag, otherwise there is no difference from other text on the page.

  

4.6. Div tag

<div> elements to combine block-level elements so that they can be formatted using styles.

  

4.7. IMG Tag

tags embed an image into a Web page, technically, the tag does not insert an image into the page, but instead links the image from the page. the tag creates a placeholder space for the referenced image.

The tag has two required properties: the SRC attribute and the alt attribute.

  

5. HTML Advanced tab 5.1, List label 5.1.1, unordered list

The unordered list is indicated by the UL tag, where the list item is represented by an Li tag, and there is no order level between the list items of the unordered list, which is tied

  

5.1.2, ordered list

The list items are represented by the OL label, and the lists are defined in a certain order by an Li tag.

  

5.1.3, custom list

Custom lists are often used to interpret and describe terms or nouns, and there are no bullets before a list item in a list is defined

  

5.2. Table Label

A simple HTML table consists of a TABLE element and one or more tr, TH, or TD elements, the TR element defines the table row, the th element defines the table header, and the TD element defines the table cell, a simple example is as follows:

  

5.3. Form label 5.3.1, form label

The field label for the form that wraps the contents of the entire form. form is the user submits the data to the background of a virtual list, the form is generally composed of text box, drop-down list, single, multi-select, text fields, etc., the Action property, used to specify the current form submission to the background of the address.
     

5.3.2, input tags

The input tag is a text box, a single radio, multiple selections, buttons, and so on. The different values of the type attribute determine the role of the input tag.

TextBox: Text
Password box: password
Radio: Radio
Multiple selection: checkbox
Buttons: button
Submit Button: Submit
Reset button: RESET

The checked property of the input tag, with a property value of only one checked, can omit the attribute value, which means that the button is selected in the radio button and the multi-select button.

  

5.3.3, select label

The Select element creates a single or multi-select menu in the,<select> element, the <option> label is used to define the options available in the list.

  

Multipe: Also a single attribute. The value is only one multiple. This property is set to indicate that the select label behaves as a list label. Otherwise, the drop-down list label is represented.

5.3.4, text field label

TextArea a text field label that is used to enter large amounts of text. The cols of the Text field label indicates how many column characters can fit. Rows accommodates how much row data.

  

5.3.5, lable label

The lable tag allows the label text to be clicked to get the focus of the label form label that labels point to.

Two ways: 1, use the For property to point to the form label 2, wrap the form label with the lable label.

  

Getting Started with HTML

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.