Python Route 14

Source: Internet
Author: User

Overview

HTML is an abbreviation for the English Hyper Text mark-up Language (Hypertext Markup Language), which is a standard language (tag) for making Web pages. The equivalent of a uniform set of rules, everyone to abide by him, so that you can let the browser according to the rules of the markup language to explain it.

The browser is responsible for translating the label into a user "readable" format, presented to the user! (Example: Djangomoan template engine)

HTML Document Document tree DOCTYPE

DOCTYPE tells the browser what HTML or XHTML specification to use to parse an HTML document

The difference between having and not
    1. Backcompat: Standard compatibility mode is not turned on (or is called "weird" mode [Quirks modes], promiscuous mode)
    2. Css1compat: Standard compatibility mode is turned on (or called strict mode [standards Mode/strict mode])

This property will be recognized and used by the browser, but if your page does not have a DOCTYPE declaration, then compatmode default is Backcompat, which is the beginning of the devil-the browser in its own way to parse the rendered page, then the different browsers will show different styles. If your page is added, then it is equivalent to opening the standard mode, then the browser will have to honestly interpret the rendering page according to the standards of the Web, so that your page in all browsers will display a look.

What's the use?

DOCTYPE tells the browser what HTML or XHTML specifications are used to parse the HTML document, and the DTD file contains tags, attributes, properties, and constraint rules.

More Meta (metadata information)

Provides meta-information about pages, such as page encodings, refreshes, jumps, descriptions and keywords for search engines and update frequency

      1. Page encoding (tells the browser what encoding)

< meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >

      1. Refresh and jump

< meta http-equiv= "Refresh" content= "30″>

< meta http-equiv= "Refresh" content= "5; Url=http://www.autohome.com.cn "/>

      1. Keywords

< meta name= "keywords" content= "StarCraft 2, star old boy, interview, F91, small color, JOY" >

      1. Describe

Example: Cnblogs

      1. X-ua-compatible

Microsoft's IE6 is through the XP, Win2003 and other operating systems released, as the dominant desktop operating system, also makes IE occupy the notice status, many Web site development, in accordance with the standards of IE6 development, and IE6 own standards is also within the Microsoft Company defined. To IE7 out of the time, the adoption of the Microsoft internal standards and some of the standard, this time many sites to upgrade to IE7 time, it is more painful, a lot of code must be adjusted to be able to run normally. And to Microsoft's IE8 this version, basically the Microsoft internal definition of the standard abandoned, and comprehensive support standards, because based on the changes to the standard, so that the original IE8 version can visit the site, in the IE8 to the normal access, there will be some typographical disorders, text overlap, Display not equal to various compatibility errors.

Internet Explorer 8 provides tighter support for industry standards than any earlier browser version. As a result, sites designed for older browsers may not appear as expected. To help mitigate any problems, Internet Explorer 8 introduces the concept of document compatibility, which allows you to specify the version of Internet Explorer that your site supports. Document compatibility adds new patterns to Internet Explorer 8, which tells the browser how to interpret and render the site. If your site does not display correctly in Internet Explorer 8, you can update the site to support the latest WEB standards (preferred), or you can force Internet Explorer 8 to display content in the same way that you view the site in an older version of the browser. You can do this by adding the X-ua-compatible header to the Web page by using the META element.

When Internet Explorer 8 encounters a webpage that does not contain a x-ua-compatible header, it uses directives to determine how to display the Web page. If the directive is missing or does not specify a standard-based document type, Internet Explorer 8 displays the page in IE5 mode (Quirks mode). More

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />Title

Web header information

Link
      1. Css

< link rel= "stylesheet" type= "Text/css" href= "Css/common.css" >

      1. Icon

< link rel= "shortcut icon" href= "Image/favicon.ico" >

Style

Write a style on a page

For example:
< style type= "Text/css" >
. bb{
background-color:red;
}
</style>
Script
      1. Introduction of documents

< script type= "Text/javascript" src= "Http://www.googletagservices.com/tag/js/gpt.js" > </script >

      1. Write JS code

< script type= "Text/javascript" > ... </script >

Common tags

Labels are generally divided into two categories: block-level labels and inline labels

    • A, span, select, etc.
    • Div, H1, p, etc.
Various symbols HTTP://WWW.CNBLOGS.COM/WEB-D/ARCHIVE/2010/04/16/1713298.HTMLP and BR

P is the paragraph, there is a gap between the default paragraphs!

BR is line break

A label

< a href= "http://www.autohome.com.cn" > </a>

1. Target property, _black means open on new page

2. Anchor

H Label H1h2h3h4h5h6select label checkboxRedio MaleWomanConfidential

ManWomanConfidentialPasswordButtonfile

When submitting a file: Enctype= ' multipart/form-data ' method= ' POST '

TextArea<textarea></textarea> <textarea style="width: 500px; height: 200px"></textarea>Label name:Marriage No:
Name:Marriage No:UL ol DL

Ul

    • Ul.li
    • Ul.li
    • Ul.li

Ol

    1. Ol.li
    2. Ol.li
    3. Ol.li

Dl

Hebei Province
Handan
Shijiazhuang
Shanxi Province
Taiyuan
Pingyao
Table
1 2 3
1 2 3
1 2 3


1
1 2 3
1 2 3
1 2 3
1 2 3
1 3 3
3 3
3 3
3 3 3
FieldSet Login

User name:

Password:

Form form




File: enctype= ' multipart/form-data ' method= ' POST '

Job Requirements:
First page: agreement, select "I agree" to enter the registration page
Second page: User name, password, duplicate password, province (dropdown menu), gender, hobby (multiple selection), use label to decorate.

For path:

    • /website root directory
    • ./current directory (equivalent to Nothing)
    • .. /Parent Road
    • .. /.. /Parent Directory Parent Directory
Css

CSS is an abbreviation for the English cascading style sheets, called Cascading style sheets, to beautify the page.

There are three ways to exist: element inline, page embedding, and external introduction, comparing the pros and cons of three different ways.

Syntax: style = ' key1:value1;key2:value2; '

    • Use style= ' xx:xxx in the label; '
    • Embed < style type= "Text/css" > </style > blocks in the page
    • Introducing an external CSS file

Necessity: The American Union is responsible for the color collocation of the page and the beautification of the picture, and the developer must know how to achieve it.

Tag Selector

div{background-color:red;}
<div > </div>

Class Selector

. bd{background-color:red;}
<div class= ' BD ' > </div>

ID Selector

#idselect {background-color:red;}
<div id= ' Idselect ' > </div>

Association Selector

#idselect p{background-color:red;}
<div id= ' idselect ' ><p> </p> </div>

Combo Selector

input,div,p{background-color:red;}

Property Selector

Input[type= ' text ']{width:100px;height:200px;}

Background
      • Background-color
    • Background-image
    • Background-repeat (NO-REPEAT;REPEAT-X;REPEAT-Y)
    • Background-position
Border

Margin
Padding
Display

Display:none

Original

Display:block

contentContent

Display:inline

Contentcontent
CursorautohomeSwaiiow
      • Cursor value provided by CSS

pointer | | Help | | Wait | | Move | | crosshair

      • Fake hyperlinks

Pointer

      • Custom (not normally used)

Mine


Floating LeftRight


leftrightpositionhttp://www.cnblogs.com/canuseethat/archive/2010/09/16/1827804.html Transparency Default Style makeover
    • Home
    • Menu 1
    • Menu 2

Python Route 14

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.