There are several ways to use CSS in Web pages to simply introduce

Source: Internet
Author: User

There are several ways to use CSS in a Web page:

CSS in the current page can be said to be necessary, if not the use of CSS, then this page is generally ugly unimaginable, the following introduction to the Web page using several ways of CSS, I hope to be helpful to beginners.

One. Inline style:

The so-called inline style is the style that unloads the tag, with the following code:

<style= "color:red;font-size:10px"></div> 

That is, use style to specify the style of the div within the tag.

Two. Internal style sheet:

The so-called internal style sheet is that the style sheet is written on the current page instead of being introduced externally, with the following code:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.51texiao.cn/" /><title>Ant Tribe</title><styletype= "Text/css">. Demo{width:200px;Height:200px;background:Green;}</style> </Head><Body> <Divclass= "Demo"></Div></Body> </HTML>

The code above uses <style type= "TEXT/CSS" ></style> prescribes an internal style sheet.

Three. external style sheet:

The external style sheet corresponds to the internal style representation, which is the introduction of an external style sheet file on the current page, rather than unloading the current page with the style code.

<href= "Css/style.css"  rel= "stylesheet"  type= " Text/css "/>

The original address is: http://www.51texiao.cn/HTML5jiaocheng/2015/0613/4140.html

The original address is: http://www.softwhy.com/

There are several ways to use CSS in Web pages to simply introduce

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.