Dreamweaver Tutorial-Why use CSS for page layout

Source: Internet
Author: User
Tags reserved dreamweaver

In order to let everyone understand the role of CSS, and why to use CSS instead of HTML tables for page layout, the following is explained by an example. One of the pages is formatted with HTML and another page is formatted with CSS.

HTML formatting instance

The HTML code looks like this:

<body>
 

Replace the word "orange" with "green" before Watts, and click the View window, and the text will now appear orange. From the above example, it is not only cumbersome but also error-prone to format Web pages through HTML.

CSS Formatting instances

The HTML code looks like this:

 

The content is exactly the same as the previous document, but is formatted with CSS. You can try to change the words behind the two color to black/red and so on.

Through two instances, do you understand why you want to control the page effect with CSS?

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.