first, the basic knowledge of the Internet
1. After the advent of the Internet, we can access all the resources of the World (servers) from the local (client) , the most basic client is the Web browser.
2. The HTTP protocol defines how the client and the server should communicate , such as the format of the data being transmitted, so that we don't have to worry about whether the data will be corrupted during transmission . So, you can find the beginning of the Web site, most of which is HTTP, which represents the use of the Protocol for communication
3. However, there are many servers, such as the video site alone Youku, Iqiyi art, music, Sohu TV, etc., in order to identify different services, each service has its own unique name, called the URL, for example, to obtain Google's logo resources, the corresponding URL is as follows: "http ://google.com/images/logo.gif "
The URL includes the following three sections:
Protocol type/HTTP/
Server's Internet address google.com
Specify a resource Images/logo.gif
4. Each communication between the server and the client is called a transaction, including the request and response two parts
5. How does our browser know how to display a page? This is the meaning of HTML,HTML tells the browser the structure and content of the page we requested
2. HTML Basics
1. HTML describes the structure and content of the Web page, in short, includes the following sections:
- Text (What do you see: The actual content you saw)
- tags (what it look like: How the content is displayed)
- associating other files (references to other documents)
- Associating additional pages (links to other pages)
2. First introduce the label, the label is composed of the following parts
< start tag > content < end tag >
<Name> Contents </Name>
Together, they are called elements, such as:
Bold (Blod):<b> content will be bold </b>
Emphasis (emphasis):<em> content will be emphasized </em>
3. Attributes provide more information about the element
Image (Images)
Link (Anchor) <a href= "www.cnblogs.com" > Blog Park </a>
From tags can be found: Some elements do not have the end tag, the reason is very simple, because these elements have no content
4. HTML does not wrap automatically
The following two types of labels are available for line wrapping:
Blank line (break):<br>
Paragraph (paragraph):<p> content </p>
What is the difference between the two? The <br> tag is an inline tag, and <p> is a block tag, and the Block label is like a box-like shell for the text (invisible box)
5. To further differentiate between inline and block labels, you can look at the <span> and <div> tags, both for organizing documents, the only difference being that <span> is an inline element, and <div> This is a block element, which means that We can set the information about the whole block
<span class = "foo" > Text </span>
<div class = "Bar" > Text </div>
Because the <span> tag is an inline tag, it won't wrap.
The <div> tag is a block element, as if surrounded by an invisible box, so it will be independent.
6. Finally, take a look at the basic structure of HTML
third, the basic knowledge of the URL
URL: Uniform Resource Locator
1. The URL includes a protocol, an address, and three sections of a specific resource path, as previously described
2. In fact, URLs include more complex content, such as:
Query Parameters:? p=1
Point to internal information: #fragment
PORT: The default port is 80 and is generally omitted
Iv. Basics of HTTP
HTTP: Hypertext Transfer Protocol
1. The server and client communication has been described before, and each communication between the server and the client is called a transaction, including the request and response two parts
2. So, what is the specific request and response? For example, read the "HTML and XHTML authoritative guide" book on the Watercress
I sent the following request to the server
Format of Request:
- Method Path Version
- get/subject/1171117 http/1.1
Of course, the content is more than one, if you are interested, you can install the live HTTP headers plugin to view
In the same vein, the watercress will respond:
Format of response:
Name: Value: Description
http/1.1 OK
The full content includes the following
3. Finally, let's say that the content returned includes both static and dynamic. For example, when requesting Google's logo information, it returns static content, but when searching, it returns dynamic content that will be introduced later.
How to build a blog 01:web basics