HTML project practice, HTML Project Practice

Source: Internet
Author: User

HTML project practice, HTML Project Practice

1. Organization importance.

First, you need to create two root folders, one for storing online page resources and one for storing test page resources. All the changes are carried out in the folder on the test page. in this folder, after testing and W3C syntax detection (HTML detection Website: HTML /), then overwrite the resources in the test folder to the Online folder. (This is only applicable to static webpages without any input. If the data is stored, it should not be overwritten directly (the data is also overwritten ~).)

Each folder must have a folder description. It indicates the reason why the folder is created, what is saved, and what is the function.

Second, we need to establish different folders to organize the structure of the webpage, but we cannot abuse this (abuse is not conducive to maintenance ).

 

2. Search for bugs

The browser developer mode is a good debugging method. You can see the style table and layout of any label.

Some browsers impose restrictions on the number of characters in the path, so pay attention to this when developing a large website.

 

3. Page Construction

Block elements are usually used as the main building modules in Web pages, while inline elements are often used to mark small pieces of content. When designing a page, you generally start with a large block element, and then add the inline element when improving the page. (Block and inline are traps. For details, see http://www.cnblogs.com/wuduojia/p/7763025.html 4th)

 

4. Why can't HTML create wheels without chaos, while C ++ advocates making wheels.

It actually means the same thing, but it looks different on the surface:

In C ++, there are many contents and features, which are suitable for building wheels. And many others have already done the wheel. If it doesn't work well, or it meets your requirements, there is no need to create it. Just look at the source code.-Of course, if you think it is not good (with flaws or the like) or does not meet your requirements (without the features you want), create another one, which means "Promoting the wheel. Don't mess with it-for example, with int, why do you have a new data type int-1.0?

In HTML, the black technology you often think of is that you did not separate HTML and CSS, or did not separate the structure and performance, for example, if you use <p> to implement the list function, the list function actually has the corresponding tag implementation-most of the time, there are already dedicated element tags that can solve your problem, or CSS can solve it, you did not know or understand it.

To sum up, the reason for determining whether the two can create a wheel is the same: Is there a corresponding "Wheel"? Does this "Wheel" Meet your own needs? What are the side effects of this wheel on your own needs? Is this side effect unacceptable?

 

5. Are there any differences between absolute and relative paths in browser resolution and response? When to use absolute paths and relative paths?

This involves many problems. The two paths have their own advantages and disadvantages. I don't know much about it. First, I should know something.

1. When you tell someone else the website, it means the domain name will be better:

After the domain name is entered, the browser will automatically find the complete URL. If you are the only domain name in the world, you will be able to find the correct one. At this time, no matter whether you change to a hosting company (for example, you change from www. wuduojia, cn is changed to home.wuduojia.cn). You only need to enter wuduojia.cn to enter the correct place. Of course, the premise is that there is no URL repeated with you (such as www. and home. only one exists, otherwise the correct one will not be found); then, if your default homepage is changed, entering wuduojia.cn only will also be automatically transferred to wuduojia.cn/index.html by the browser (refer to the main page name, Here index.html is just an example). (If you tell others that it is "Hangzhou .)

2. Use relative links to link pages on the same website and URLs to link pages on other websites:

.... One problem is that if a web page contains many URLs, they will be difficult to manage: the URL is very long, not easy to edit, and will also affect the readability of HTML ........ if a website uses a URL to link to a local page, when you move the website or change its name, you must modify all these URLs to reflect the new website location... we recommend that you use relative links to link pages on the same website and URLs to link pages on other websites. "

-------- Head first HTML and CSS P145

 

6. http://www.wuduojia.cn: 8000/index.html -- What is 8000 here?

8000 is an optional port that can be placed in an http url. Generally, everything on the Web is transmitted to a default port (80), but sometimes the Web server is configured to receive requests (such as 8000) on another port) -- this situation often occurs on the test server.

 

7. Do not put the links together. It is difficult for users to differentiate them.

 

8.tar get label and user habits.

My website decides to use the target tag based on your preferences. However, for a webpage that faces users rather than itself, this tag is not used or used, you need to carefully investigate and weigh.

 

9. It is necessary to understand the built-in default styles of various browsers (or mainstream browsers.

 

10. different browsers have slight differences in the way pages are processed (this difference refers to the default style). This difference not only exists in different browsers, it will also appear on the network speed difference, the network speed is fast (compared to the loading of slices), different screen sizes (in most cases, it refers to the mobile end and the desktop end, for example, your style is built on P, the Mobile End is smaller than this one), etc.

Therefore, testing is an important task, not only between different browsers, but also between different terminals and different traffic levels. This will happen in the future, currently, only different browsers are considered (different terminals, different resolutions, and different devices will be considered later)

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.