Beginners: Web page production is to write HTML first or write CSS first?

Source: Internet
Author: User
Tags html page
css| Beginners | Web page

Do you want to prepare the CSS file first or write the HTML file first? There are many answers on the Web: write HTML before writing CSS, write css and write html;

My rule is to write HTML first to lay a good foundation, and then write the CSS performance control!

For beginners I suggest writing the two together, writing CSS first or writing HTML first is not an appropriate way for beginners.

If you let a person write code, you tell him to write HTML first, after writing HTML can not be modified, and then you write CSS, if he can write, then this person must be a very high level of builder! So for beginners, most of the time I suggest writing simultaneously, specifically I say the steps:

1, the first to build the site, the directory is built, such as we have a good folder Css,images, these two are the most, and then create a new HTML file, a style.css an empty style sheet, the HTML page to connect to this external style sheet.

2, then we first write HTML in the most basic layout part, are used Div, and then directly in the div add ID or class, these layout parts include the coat part, the head part, the middle part, left, middle, right, copyright part.

3, write these, then you can go to the style sheet to write style, or you in the next part of the layout, we take the head as an example, in the head to write logo part, NAV Part also add ID or class. Other empathy.

Why is it that we can't write HTML parts at once, because people are likely to make mistakes, maybe your thoughts are written in a problematic way, or for browser compatibility issues, some of which you don't anticipate in advance due to lack of experience, So it's possible to change your HTML code when you're writing a style and you find a problem. Big to the writing is like this, you can also html/css at the same time, can be, see your habits. When we write code, we often write the code side of the test, not to say to write a test sentence, but to write a piece of code after the browser test, I was at the same time with IE6 and FF test. A good producer. Their code is written a lot when they are tested, because if a person has more experience, they will know and prevent the browser error display in advance! So they write code faster than people with no experience. They've gone through the mistakes you've been going through, and the first time you've encountered the wrong browser display problems you take time to fix, and they can be prevented or encountered in advance to solve the problem immediately! That's one of the different points you have with them.

Beginners and master different points there is a master of the use of a large number of shortcuts, so be sure to remember those commonly used shortcut keys, each small detail has a little improvement, integrated together is a great improvement.

In addition to improve their level the best way is more practice, find some better html+css template coding practice, the beginning to choose a simple point, the page screenshot, and then the picture with their own ideas to revert to HTML page!



Related Article

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.