1 / 7

CSS

CSS . 16 January 2014. CSS. CSS is for giving style to your content HTML: content CSS: style CSS Zen Garden. Adding CSS to your HTML. The best (only way for this class!) way to insert CSS to your HTML is by using an External Style Sheet Define all your styles in one place

alina
Télécharger la présentation

CSS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSS 16 January 2014

  2. CSS... • CSS is for giving style to your content • HTML: content • CSS: style • CSS Zen Garden

  3. Adding CSS to your HTML • The best (only way for this class!) way to insert CSS to your HTML is by using an External Style Sheet • Define all your styles in one place • Easily change the look of your site • Use the following <link> tag within the <head> tag • Save your external style sheet as a .css file. <link href=“mystyle.css” rel=stylesheet>

  4. Everyone make a style sheet… • New HTML file in Komodo • New CSS file in Komodo (mystyle.css) • Link CSS file from HTML (in head section!) <link href=“mystyle.css” rel=“stylesheet”>

  5. Syntax (how it looks) • Selector specifies the HTML element to style • Declaration: • always contains a property & value • ends with a semicolon • Property: style element you want to change • Value: what you are changing the property to

  6. Formatting your CSS • Formatting Practices: • some flexibility, but you must be consistent. • always comment unclear code! • /* someCommentHere */ • curly braces • tab alignment • Bad practices: • declarations on the same line as braces or selector • multiple declarations on the same line • leaving off the last ; • What does Komodo help you with? • drop downs • formats • syntax errors

  7. Commonly Used Tags & Properties full reference sheet

More Related