Preview

Cascading Style Sheets: Notes

Good Essays
Open Document
Open Document
453 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Cascading Style Sheets: Notes
CSS Notes * Cascading Style sheets * Inline() * Inbeded {} * Linked {}
CSS codes have two parts : the selector and the declaration has two section: the property and the value. The following illustrates the CSS format: * Selector{ property; value} * Selector would be body
The selector must come first and be followed by at least one space. The declaration is enclosed in curly brackets({}). Within the brackets, the property must come first, followed by a colon and at least one space, then the value. The following is a simple example of CSS: Body {color: black}
In this example, body is the selector( what we are controlling) and the part starting with the curly bracket, ({}) , and ending with the closed curly brackets, (}), is the declaration (what we are doing to the selector)
Within the declaration, color is the property ( the particular part of the selector we are controlling) and black is the value.( what we would like the property to be).
CSS declaration can be stacked onto one selector. If we want the background white, the text, color, color black, and the font a 123-point sans-serif, we can make multiple declarations. Separating them by semicolons. The following code shows a stacking of CSS declarations:
Body {background: white; Color: black; Font-size: 12pt; Font-family: sans-serif; }
There are three ways to include CSS information in a document: in the document head, in a separate file, and inline with XHTML.
In the Document Head If the style information applies only to one document, you would include it within the document head, enclosing it in and code so as to avoid problems with browsers that do not support CSS. To specify the background color of the document as white, we would write.
If you have style sheets information that you would apply to more than one document, it would be a waste of time to type the style information into each document. Even if you

You May Also Find These Documents Helpful

  • Good Essays

    79) The ________ property appears in parentheses so it will appear at the top of the alphabetical Property list.…

    • 3668 Words
    • 15 Pages
    Good Essays
  • Satisfactory Essays

    Other major changes include CSS Selectors which CSS2 had simple selectors and the new version calls the components as a sequence of simple selectors. Pseudo elements because many Pseudo elements have been added that allow in-depth yet easy styling. Also a new convention of double colons ‘::’ has been introduced. Style properties let multiple background images be layered in the box using different elements like background image position and repeat. Border style is the styling of borders that extended to images and rounded designs which includes creating image of the borders and then automatically apply image to the borders through CSS.…

    • 272 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    14. This XHTML element is used to indent and separate an area of text. It was originally intended for use with quotations: blockquote…

    • 335 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    A <footer> element should contain information about its containing element.A footer typically contains the author of the document, copyright information, links to terms of use, contact information, etc.You can have several <footer> elements in one document.…

    • 235 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Using the links below and Internet research, list the usage for each of the HTML tags in the table below.…

    • 242 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    Nt1310 Final Exam

    • 746 Words
    • 3 Pages

    A(n) __________ statement must be inserted into all Web pages in which you want to use an external style sheet.…

    • 746 Words
    • 3 Pages
    Good Essays
  • Good Essays

    It237 Week 2 Checkpoint

    • 414 Words
    • 2 Pages

    Next, I will be describing the embedded cascading style sheet as well as a pro and a con for it. An embedded style is where you would write the CSS or cascading style sheet code in the section of an HTML document. When using embedded style it only applies to the one document in which the code is embedded. One pro to using the embedded style it could be used for quick fixes. It could also be used for prototyping and simple test without having the inconvenience of switching back and forth between CSS documents and the HTML files themselves. One of the biggest cons in using the embedded type is that some of the email clients out there do no allow the styles in the heading.…

    • 414 Words
    • 2 Pages
    Good Essays
  • Good Essays

    External CSS is a file that contains only CSS code and is saved with a .css file extension. In your HTML you will use the <link> not the <style> tag to insert the style sheet. The code would look like this:…

    • 520 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Ifsm 310 Report

    • 1224 Words
    • 5 Pages

    Blue text enclosed in square brackets ([text]) provides instructions to the document author, or describes the intent, assumptions and context for content you need to include in the document..…

    • 1224 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Nt1330 Final Exam

    • 2055 Words
    • 9 Pages

    The term cascading is used because designers can apply many style sheets to the same Web page, one on top of the other.…

    • 2055 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    HTML is currently in its fifth revision or HTML53. With HTML5 a standard is set for how to display the web page; where pictures are displayed, fonts used for text and total layout of the page. XML (extensible markup language) is used for web documents. CCS (cascading style sheet) is written into the HTML document or attached as a file to define the appearance of the displayed page.…

    • 897 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Every section has fields for a section name and section content. When entering content, you will notice a toolbar above the editing field. This bar contains helpful features to format and guide your writing. 1. Bold – bolds highlighted text 2. [ Italic – italicizes highlighted text 3. Underline – underlines highlighted text 4. Text Color – allows you to change text to a color selected from…

    • 324 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    The paper should adhere to the formatting that the template provides. Templates for Word and Latex are…

    • 1084 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Project Plan Sample

    • 1503 Words
    • 7 Pages

    • Blue italicized text enclosed in square brackets ([text]) provides instructions to the document author, or describes the intent, assumptions and context for content included in this document.…

    • 1503 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    What are the advantages of external cascading style sheets (CSS) compared to internal CSS and the embedded ? Explain situations in which each is the appropriate type. Given these situations, which type do you think would be more useful for the majority of web pages?…

    • 426 Words
    • 2 Pages
    Satisfactory Essays

Related Topics