Common HTML elements

Source: Internet
Author: User

Common HTML elements
HTML introduction:

HTML English name: Hypertext Markup Language Chinese name: Hypertext link Markup Language ("Hypertext" means that a page can contain pictures, links, and even music, programs, and other non-text elements ). HTML5 is the fifth major modification of HTML.

WWW introduction:

We enter the Web site on the Internet, generally including WWW. For example, to query Baidu, we need to enter www.baidu.com. Actually WWW, which is the abbreviation of World Wide Web. The World Wide Web is usually referred to as Web. It is a huge information space composed of countless commercial, educational, and entertainment materials. The webpage we browse is the Web page. Most Web pages are written in HTML.

HTML elements and tags:

The structure and format of webpage documents are defined by HTML elements. The range defined by a single tag or a pair of tags is an HTML element. The start tag does not start with a slash (/). The end tag starts with a slash. For example, the simplest example

Hello World! It is the start tag and the end tag. The browser displays the content Hello World !. 

Four HTML elements:

Empty Element


Empty element with attribute

Elements with content 
Elements with content and attributes 

For example, we compile
Hello World! 

Open with IE. The displayed page is

Code:

Tags related to paragraph Control

 

Paragraph: Creates a segment. The align attribute indicates the alignment of segments. # It can be left, center, right, or justify.


Line break: line feed.

 

Indicates the role of horizontal rule: inserts a horizontal line. The attribute color is used to specify the color of the line.

 

Labels related to text display

 

... Center text display

 

... The title of the expenditure document. n is an integer from 1 to 6. 1 is the largest title, and 6 is the smallest title. Align is used to set the title alignment, # It can be left, center, right

... Used to set the font. Attribute size indicates the font size. n can be an integer from 1 to 7. The larger the number, the larger the font size. Attribute color indicates the font color.

...Make text bold

...Make text Italic

 

HTML comment

The format of the comment is as follows:

 
Take a meditation for example:
  Meditation Author: Li Bai

The light is shining in front of the window, and it may be frost on the ground.
Look up at the moon and look down at your hometown.


Display page

After viewing the source code:

List-create a list of numbers

Use

Transcript of the final exam for 2015
Name Mathematics English Chinese
Zhang San 78 88 89
Li Si 78 88 89
Wang Wu 78 88 89
Form example
Baidu
  1. And
  2. Create a list of tags with numbers

     

    In

    1. Use the start attribute in the tag to set the start sequence number.

       

      In

    2. Label to change the numbering order in the list.

       

      For example

      
          
      1. VB
      2. C ++
      3. C #
      4. JAVA
      5. VC

      Display page

      JAVA starts from 20.

      Table-Define table elements

      Example:


      Display Effect

      Input element

      The preceding is the input attribute.

      For example:


      Running Effect

      Hyperlink Element

      The syntax for creating a hyperlink is as follows:

      ... The href attribute is used to specify the target address of the link to be located at http://blog.csdn.net/zsx701/article/details/url. The text entered between them is used as the link text displayed in the browser.

      For example:

      The first is the form link, and the second is the Baidu link.
          

       

       

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.