You are on page 1of 4

Valeros, Julius Paulo M.

1.Define css
A cascading style sheet (CSS) is a Web page derived from
multiple sources with a defined order of precedence where the
definitions of any style element conflict. The Cascading Style
Sheet, level 1 (CSS1) recommendation from the World Wide Web
Consortium (W3C), which is implemented in the latest versions of
the Netscape and Microsoft Web browsers, specifies the possible
style sheets or statements that may determine how a given
element is presented in a Web page.

definitions
The STYLE attribute on an individual element tag
The STYLE element that defines a specific style sheet containing
style declarations or a LINK element that links to a separate
document containing the STYLE element. In a Web page, the
STYLE element is placed between the TITLE statement and the
BODY

2. What are the advantage and


disadvantages of css
advantages
CSS helps to make the changes of the layout and design of the
site very easily. The file size of the CSS is very small hence your
website takes minimal loading time. The external CSS has made
easy for the visitors who want to see only the content from the
website. By creating the CSS, you can make the web design
flexible.

disadvantages
CSS works differently on different browsers. IE and Opera
supports CSS as different logic.

What is the basic syntax code of css


A CSS rule-set consists of a selector and a declaration block:

The selector points to the HTML element you want to style.


The declaration block contains one or more declarations
separated by semicolons.
Each declaration includes a CSS property name and a value,
separated by a colon.
A CSS declaration always ends with a semicolon, and declaration
blocks are surrounded by curly braces.
In the following example all <p> elements will be center-aligned,
with a red text color:

4. What are the three ways to use color in css


In-line
In-line styles are plonked straight into the HTML tags using
the style attribute.
They look something like this:
Internal

Embedded, or internal, styles are used for the whole page. Inside
the head element, the style tags surround all of the styles for the
page.
External
External styles are used for the whole, multiple-page website.
There is a separate CSS file, which will simply look something
like:
Style Sheets
Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a markup
language.
rule
A CSS rule-set consists of a selector and a declaration block: The
selector points to the HTML element you want to style. The
declaration block contains one or more declarations separated by
semicolons. Each declaration includes a CSS property name and
a value, separated by a colon.
selector
A CSS selector is the part of a CSS rule set that actually selects
the content you want to style. Let's look at all the different kinds
of selectorsavailable, with a brief description of each.
property
In CSS, a property is like a tag in HTML. These are the items that
define how the styles should look on the Web page or elsewhere.
value
A formal grammar, the CSS value definition syntax, is used for
defining the set of valid values for a CSS property or function. In
addition to this syntax, the set of valid values can be further
restricted by semantic constraints (like, for a number to be strictly
positive).

declarations
declarations that would help developers and users easily override
normal specificity when making changes to their stylesheets.