Making Web pages with HTML

Source: Internet
Author: User

Web basic Information "encoding format"

gb2312: Simplified Chinese, commonly used for pages that contain both Chinese and English

ISO-885901: Plain English, generally for pages that contain only English

Big5: Traditional Chinese, general user pages with traditional characters

Utf-8: The international character encoding is also applicable to pages that contain both Chinese and English. Compared with gb2312, it has good international compatibility, but the character compression is relatively low, which has a certain effect on Web page performance.

The difference between HTML and XHTML

The difference between HTML and XHTML can be roughly divided into two broad categories, one is the difference in functionality, the other is the difference between the writing habits, the difference in functionality, mainly XHTML compatible with the major browsers, mobile phones, and PDAs, and the browser can quickly compile the page correctly.

Writing habits:

All labels must be lowercase

tags must be paired (except for individual)

Label order must be correct

All attribute values must use the full form

Notes and Special symbols:

Space: 

Greater than sign:>

Less than number:<

quotation marks:"

Copyright Symbol @ ©

The HTML document is formatted as the following code:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><title>This is the title</title></Head><Body>    <H1>My first title</H1>    <P>My first paragraph.</P></Body></HTML>

Anchor Chain Connection:

Jump from a position on page A to position B on this page.

Jump from a position on page A to position B

To create a step:

Create Jump Markers

<name= "marker"> b position </a>

Create a jump link

<href= "#marker"> a position </a> 

The basic HTML tags include:

Application of the basic label:

< H1 > This is a title </H1><H2> This is a title </  h2><h3> This is a title </h3  >

Image img Tags:

<src= "1.png"  width= "258"  height= "All"/ >

<b> define Bold text

<em> Define text-focused

<i> Define Italic characters

<small> define Small words

<strong> define aggravating tone

<sub> define subscript Words

<sup> defining superscript words

<ins> define Insert Words

<del> define Delete words

Applications with sequential lists

Type value:

1: Use numbers as bullets

2: Use uppercase/lowercase characters as bullets

3: Use uppercase/lowercase roman numerals as bullets

Comparison of ordered, unordered, and defined lists

Unordered list:

Implemented as <ul> tags, with <li> tags representing list items

Setting bullets with the Type property

Disc, square, Circle

There are sequence tables:

Implemented as <ol> tags, with <li> tags representing list items

Set item order By Type property

1, a, a, I, I

Definition List

Implemented with <dl> tags

Define list items as <dt> tags

Define content with <dd> tags

No bullets and display order

TABLE element Format:

<type= "text"  name= "fname"  value= "text" >

Type: Specifies the types of elements, Text,password,checkbox,radio,submit,reset,file,hidden,image and buttons, default to Text

Name: Specify the names of the form elements

Value: The initial value of the element, a value must be specified when type is radio

Size: Specifies the initial width of the form element, when the type is text or password, and the size of the form element is in characters. For other types, the width is measured in pixels.

MaxLength: The maximum number of characters entered when the type is text or password.

The following is a partial example of a form:

<formAction=""Method= "Get">    <P>Please enter user name:<inputtype= "text"name= "User"placeholder= "Please enter user name">    </P>    <P>Please enter user password:<inputtype= "Password"name= "Password"placeholder= "Please enter password">    </P>    <P>Hobbies:<inputtype= "checkbox"name="">drinking<inputtype= "checkbox"name="">Smoking<inputtype= "checkbox"name="">Play Bridge</P>    <P>Gender:<inputtype= "Radio"name= "Sex">male<inputtype= "Radio"name= "Sex">female</P>    <P>Upload file:<inputtype= "File"name="">    </P>    <P>Hidden fields:<inputtype= "hidden"name= "Yincang"value= "Yincang">    </P>    <P>Picture button:<inputtype= "image"src= "1.png"name=""width= "100px"Height= "50px">    </P>    <P>reason for login:<inputtype= "text"name= "Liyou"size= "26px"maxlength= "5"placeholder= "Enter up to 5 characters">    </P>    <BR>    <inputtype= "Submit"value= "Login"style= "border:none;width:70px;height:30px">    <inputtype= "Reset"value= "Reset"style= "border:none;width:70px;height:30px"></form>

This includes uploading files, hiding fields, picture buttons, qualifying the length of the content in the text box, and qualifying the maximum number of characters.

Making Web pages 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.