WRT235: Writing in Electronic Environments Basic CSS.

Slides:



Advertisements
Similar presentations
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Cascading Style Sheets
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Cascading Style Sheets
Today CSS HTML A project.
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
1 Getting Started with CSS. 2 CSS Cascading Style Sheets XHTML provides structure for our documents (web pages) CSS provides Style or Presentation for.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
4.01 Cascading Style Sheets
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
Computing Concepts: CSS. Aims  To understand the uses of css  To understand the different types of css  To be able to create a css file  To be able.
 Missing (or duplicate) semicolons can make the browser completely ignore the style rule.  You may add extra spaces between the properties/values to.
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
Cascading Style Sheets Dreamweaver. Styles Determine how the HTML code will display Determine how the HTML code will display Gives designers much more.
Review: Three parts to a webpage: - Content - Structure  XHTML - Presentation  CSS In this chapter we will focus on introducing and examining the mechanics.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Cascading Style Sheet (CSS)
I NTRO TO CSS IAT100 Spring I NTRO TO CSS Covered in this lesson: Overview What is CSS? Why to use CSS? CSS for Skinning your Website Structure.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
WRT235: Writing in Electronic Environments CSS Classes, IDs, divs.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 8: Working with Style Sheets.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Cascading Style Sheets I Embedded Style Sheets. Page Design ICSS 2Instructor: Sean Griffin What is a Style Sheet? A style sheet is a text file that contains.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
CSS FOUNDATIONS IN-DEPTH The nitty-gritty of css...
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.
Internet & World Wide Web How to Program, 5/e 1. 2.
4.01 Cascading Style Sheets
( Cascading style sheet )
>> Introduction to CSS
Intro to CSS CS 1150 Fall 2016.
Website Design 3
Intro to CSS CS 1150 Spring 2017.
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
Cascading Style Sheets (Introduction)
Cascading Style Sheets (Introduction)
What are Cascading Stylesheets (CSS)?
DynamicHTML Cascading Style Sheet Internet Technology.
CSS Styles Introduction.
Web Design & Development
4.01 Cascading Style Sheets
Presentation transcript:

WRT235: Writing in Electronic Environments Basic CSS

Agenda  Introduce DOM  Introduce basic CSS  Inline styles  Style sheets  Start Module 4

DOM: Document Object Model  Model for parsing HTML  Initiated in the browser  Creates relationships between objects (parent-child nodes)  Enables you to manipulate objects  CSS – styles, colors, transitions, positioning  Javascript – read, change, or remove objects in the HTML

DOM: Document Object Model Document Root Element: Element: Text: “My title” Element: Element: Text:”My header”

CSS: Cascading Style Sheets  Allows us to add style to our HTML markup  Reusable  One rule for many objects  One CSS file for many pages  Cascade effect  Changes flow down to many different objects  Change all documents by changing rules  Saves time and makes revision easier

CSS: Cascading Style Sheets  CSS requires the DOM to work  CSS uses the hierarchical parent-child node and styles objects according to these relationships  Style specific objects based on names or attributes

CSS: Getting started  Prepare an HTML document in your text editor using our default structure  Add the following objects to your file:  2 headers ( )  4 paragraphs ( ) with loren ipsum text  A list with 4 items  3 non-functional links ( link 1 )  Save and test in browser

CSS: 3 Types of Styles  Inline styles  Inline embedded  External

CSS: 3 Inline styles  In your XHTML file, add the following attribute to one of your paragraphs:  Save and test in browser  Generally, we don’t ever like to use inline styles  Why do you think that is?

CSS: 3 Inline Embedded Styles  In your html file or Thimble view add the following rules to the section of your document. p {color:green; font-size:20px:}  Save and test in browser  We also don’t like to use this method. Why?

CSS: Anatomy  The basic anatomy of a CSS rule can be found in the embedded inline style method: p {color: green } selectorpropertyvalue {declaration block }

CSS: Anatomy The basic anatomy of a CSS rule can be found in the embedded inline style method:  Selector – indicates what object the style rule applies to  Declaration – a markup block that specific what will happen to the selector  Property – indicates what aspect of the selector will be styled  Value – determines what the property will be

CSS Property: color  Refers to the font color of the  Can take human readable values  red, green, blue, black  Ex. color:green;  Can take hex values  #FF0000, #00FF00, #0000FF, #  More precise for monitor rendering  Can take rgba values  rgba(255,0,0,1)

CSS Property: color activity  Go back to your HTML file and practice changing the embedded style color with human readable, hex, and rgba values.  When using the rgba value, change the a to any number < 1. See what happens to the font color

CSS Property: border  Return to your HTML file  In the section, ad the following: h1 {border:2px solid red}  See what happens

CSS Property: border Border can take 3 values after the colon  Thickness  Examples: thin, thick, 2px, 5px  Style  solid, dashed, dotted  Color  Same types of values for the color property

CSS Property: font-size Font-size can take various values  Pixels  20px, 30px  em  1em, 2em  Text values  Small, medium, large, xx-small

CSS: External The most desirable type of CSS is an external stylesheet that is linked to the XHTML document:  Enables separation of form and content  1 style sheet to control the appearance of multiple webpage  Need only change the link to the.css file to change the style of a webpage

CSS: External  Open a new file in your text editor  Copy and paste the styles you have used for your embedded inline styles  Delete the tags; you no longer need it here  You can retain the rules format used earlier  Personally, I prefer to space out my CSS rules p { color:red }  Save the file in the same location as your open XHTML doc as test.css

CSS: External cont.  In the section of your working HTML document, include the following relative link with the appropriate file names:  Save and reload the XHTML page in your browser