CSS Learning style sheet Basics

Source: Internet
Author: User
Tags define definition
css| style Sheet What is a style sheetCSS is the abbreviation for cascading Style Sheet. "Cascading style forms." is a markup language for (enhanced) control of page styles and allows the separation of style information from Web page content. How to add a style sheet to your Web pageYou can add a style sheet to your Web page in three different ways. The higher the style definition priority is the closest to the target.   The high priority style inherits the non-overlapping definition of the lower priority style but overrides the overlapping definition. Link to an external style sheet file (linking to a style Sheet) you can first create an external style sheet file (. css) and then use the HTML link object. Examples are as follows: <title>title of Article</title>
<link rel=stylesheet href= "http://www.webjx.com/style.css" type= "Text/css" >
In XML, you should add in the declaration area as shown in the following example: Xml-stylesheet type= "Text/css" href= "Http://www.webjx.com/style.css"?>> define an internal style block object (embedding a style blocks)You can insert a <STYLE>...</STYLE> block object between the <HTML> and <BODY> tags of your HTML document. Define how to see style sheet syntax. Examples are as follows: <style type= "Text/css" >
<!--
Body {font:10pt "Arial"}
H1 {font:15pt/17pt "Arial"; Font-weight:bold Color:maroon}
H2 {font:13pt/15pt "Arial"; Font-weight:bold Color:blue}
p {font:10pt/12pt "Arial"; Color:black}
-->
</style>
<body> Note that this setting of the Style object's Type property to "Text/css" allows browsers that do not support this type to ignore style forms. Inline definition (Inline Styles)Inline definition is the use of the object's style property to define the style sheet properties that apply to the object's markup. Examples are as follows: <p style= "margin-left:0.5in; margin-right:0.5in "> This line has been added around the outer patch <p> style sheet Syntax (CSS Syntax)Selector {Property:value}
Parameter description:
Selector--Selection character
Property:value--style sheet definition. The property and property values are separated by a colon (:). The definitions are separated by semicolons (;) inherited value (the ' Inherit ' value)Each attribute has a specified value: Inherit. It means that it is worthwhile to equate the value of a parent object with a computer. This value is usually just a standby. An explicit declaration that it can be used to emphasize.

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.