Sharing: HTML common face Test __html

Source: Internet
Author: User
HTML Basics 1.1 Describe the complete process of a Web page from the start request to the final display.

Generally can be divided into 7 steps:

1. Enter the URL in the browser;

2. Send to DNS server and obtain the IP address of the Web server corresponding to the domain name;

3. Establish a TCP connection with the Web server;

4. The browser sends the corresponding HTTP request to the Web server's IP address;

The 5.WEB server responds to the request and returns the data for the specified URL, or the error message, and redirects to the new URL address if the redirection is set.

6. Browser download data to parse the HTML source file, parsing the process of implementation of the page layout, parsing completed in the browser to display the underlying page.

7. Analyze the hyperlinks on the page and display them on the current page, repeat the process until no hyperlinks need to be sent to complete the display.

What is the role of the 1.2 doctype statement? How strict mode is differentiated from promiscuous mode.

The HTML language has been around for too long, and there is bound to be some different versions of the document. In order to make the browser aware of your document's version, type, and style, you need to specify the version and style of the current document with the DOCTYPE declaration at the beginning of the document. If you provide version information in a Web page, you can help verify that the code in the page conforms to the current version and style.

<. The doctype> declaration is at the front of the document, before the label, informing the browser's parser what document type specification to use to parse the document.

In strict mode (standard mode), browsers render pages based on specifications, and in promiscuous mode, pages are displayed in a backward-compatible manner to prevent old sites from working.

If the HTML document contains a form-complete doctype, it is typically rendered in standard mode. For HTML4.01 documents, DOCTYPE, which contains strict DTDs, often causes the page to render in standard mode. DOCTYPE does not exist or is incorrectly formatted to cause the document to be rendered in promiscuous mode. 1.3 Briefly describes the common browser kernel.

The browser kernel assignment explains the syntax of the Web page and displays the Web page, which determines how the browser displays the content of the page and the formatting information of the page.

Common browser kernels:

Trident:ie Browser

Gecko:mozilla browsers, such as Firefox

Webkit:safari Browser, also the core of the Chrome browser

Blink:chrome Browser, Opera browser 1.4 How to understand the semantics of HTML tags.

The main purpose of semantics is to intuitively understand the use and function of tags (markup) and attributes (attribute).

It can be summed up as: Do the right thing with the right label.

HTML semantics can make the content of the page structured, easy to browser parsing, easy to search engine resolution, and improve the maintainability and reusability of the hat.

For example, use a tabbed div with no semantics as little as possible, using structured tags 1.5 What is the role of anchor points. How to create an anchor point.

An anchor point is a mark of a line in a document, similar to a bookmark, used to link to a location in a document. Once the anchor point is defined, we can create a link that jumps directly to the anchor point, such as a section of the page, so that the user does not have to scroll the page to find the information they need.

When you use the <a> element to create an anchor point, you need to name it by using the Name property, as shown in the following code:

<a name= "Anchorname1" > Anchor point one </a>

You can then create the link and jump directly to the anchor point, as shown in the following code:

<a href= "#anchorname1" > Back to Anchor Point one </a> 1.6 using <label> element display text is different from using other text markers to display text.

The intuitive effect of the <label> element is to display the text between the tags directly, without any special effects for the text. However, unlike other text tags, it improves user experience for the user of the mouse.

This is because the,<label> element can come with a for property that, whenever the value of the property is set to the value of the ID property of any one of the controls in the form, the browser automatically shifts the focus to the label-related form control when the user clicks on the label (text). That is, if you click text within the <label> element, the control is triggered. 1.7 Enumerate the commonly used structural markers and describe their effects.

Structure tags are designed to identify the different structures of a page and can be semantically labeled relative to the use of <div> elements.

Common structural labels are:

<nav> elements: A section of navigation links used to define a page;

<section> elements: Used to define a section in a document that represents a specific part of a document;

<article> elements: Often used to define content that is separate from other parts of the document

<footer> elements: Often used to define the footnote information of a region;

<aside> elements: Often used to define some of the additional components of the page, such as ads, sidebar and related reference information.

1.8 What are the common forms of hyperlinks?

<a> elements are used to create hyperlinks, and the common manifestations are:

Normal hyperlink. Syntax: <a href= "target=" > Text </a>

The download link, which is the target document, is a download resource. Syntax: <a href= "Day.zip" > Downloads </a>

Email link to link to email. Syntax: <a href= "mailo:1234546@qq.com" >

Contact Us </a>

An empty link to return to the top of the page. Syntax: <a href= "#" >...</a>

Link to JavaScript to implement specific code features. Syntax: <a href= "javascript: ..." >...</a>

1.9 Briefly describes the differences between inline and block-level elements.

Block-level elements are automatically wrapped before and after, as is the case with line breaks in the figure. By default, block-level elements are exclusive to one row. For example, <p>,

Inline elements can be on the same line as the enterprise inline element, and are displayed in the browser without wrapping. such as <a><span>. For inline elements, you cannot set their height and width.

There is also an element, inline block level elements, such as <input> elements. These elements can be in the same row as other inline elements, and can be set to their height and width.

1.10 Table one-way server submits data in several ways. What is the difference between these ways.

There are two common ways to send form data to a server: Get and post.

The HTTP requests that the browser sends to the server are divided into the request header (header) and the request body. It must include a header that specifies the way, the purpose, and other critical information to send the request, while the subject is optional. Separated by a blank line between the header data and the principal data.

For example, you need to send a request to a page getstockprice.php, and you need to attach data symbol=msft. So if you use get to send data, the simplified request data reads as follows:

Get/trading/getstockprice.aspx? Symbol=msft http/1.1

Host:localhost

If data is sent using post, the simplified request data is as follows:

Get/trading/getstockprice.aspx http/1.1

Host:localhost

Content=type:application/x-www-form-urlencoded represents the MIME type of the request

Content-length:11 indicates the length (size) of the request data

Symbol=msft

This shows that the difference between the two methods is mainly in different ways of sending data.

When you use a Get method to send form data to the server, the form data is appended to the end of the URL property, and when the Post method sends the data, the data is sent in the body.

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.