HIGHER COMPUTING CSS. WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).

Slides:



Advertisements
Similar presentations
Cascading Style Sheets. Next Level Cascading Style Sheets (CSS) - control the look and feel of your HTML documents in an organized and efficient manner.
Advertisements

CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Cascading Style Sheets Please use speaker notes to get complete information! Cascading Style Sheets.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
1 CSS Styling with Fonts and Colors. 2 CSS Cascading Style Sheets and fonts CSS provides Style or Presentation options for our html pages CSS properties.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSE CASCADING STYLE SHEETS CSS Faculty of Computer Science and Engineering.
Workshop: CSS-Part I Cascading Style Sheets add style to your HTML web pages.
More HTML Chapter 4. 2 Nesting Tags How do you write the following in HTML? The wrong way: This is really, REALLY fun ! Tags must be correctly nested.
WEB PAGES: CREATING AND MAINTAINING ** Tom Keane & Mayis SeapanInstructors: HTML Tags to format your text.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
Review: Three parts to a webpage: - Content - Structure  XHTML - Presentation  CSS In this chapter we will focus on introducing and examining the mechanics.
HTML/CSS Hyper Text Markup Language. CSS Cascading Style Sheets.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
1 Cascading Style Sheets (CSS) Part 2. 2 The Sources of Style Sheets.
Cascading Style Sheets " Provide means to control and change presentation of HTML documents. " Allow the user to impose a standard style. " Three levels.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS: Cascading Style Sheets. 2 What are Style Sheets A style sheet is a mechanism that allows to specify how HTML (/XHTML/XML) pages should look The style.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
3-Oct-15 CSS First CSS Lecture Applications to HTML.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Cascading Style Sheets Class 2, Lecture 2 Rachel A Ober
ALBERT WAVERING BOBBY SENG. Week 2: HTML + CSS  Quiz  Announcements/questions/etc  Some functional HTML elements.
Stylin’ with CSS Monday October 8 th and Tuesday October 9 th.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
Files you will need ... Black Goose Bistro Summer Menu
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
CSS with XHTML Please use speaker notes for additional information!
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
1 Web Development CSS (Cascading Style Sheet). 2 1.Setting rules for multiple elements To decrease the amount of typing for setting rules for multiple.
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.
OV Copyright © 2008 Element K Content LLC. All rights reserved.  Format Text  Format Lists  Format Images  Modify Page Background Applying Styles.
Lecture 2: Cascading Style Sheets (CSS) Instructor: Dr. M. Anwar Hossain.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS for Styling CS The good, the bad and the… ugly!  Tags such as b, i, u, and font are discouraged in strict XHTML  Why is this bad? CS380 2.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Web Design (14) CSS Formatting Text. Formatting Text In Brackets, go to your ‘externalcss’ website and find the ‘formattingtext’ page. Use the ‘main’
CSS: Cascading Style Sheets Part II. Style Syntax.
CSS Cascading Style Sheets *referenced from
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
Font-Family, Color and Background. Basics  CSS rule: Selector (multiple separated by, ) Declaration (multiple separated by ; ) Example: p { color: red;
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Links All CSS properties can be applied on links (i.e. change colors, fonts, underline, etc). The new thing is that CSS allows you to define these properties.
CSS DHS Web Design. Location Between the & Start with – End with –
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.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Cascading Style Sheets Color and Font Properties
Creating Your Own Webpage
Cascading Style Sheets
Introduction to Web programming
Stylin’ with CSS.
Cascading Style Sheets Color and Font Properties
Stylin’ with CSS.
Cascading Style Sheets
Stylin’ with CSS.
Introduction to Cascading Style Sheets (CSS)
Presentation transcript:

HIGHER COMPUTING CSS

WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).

HOW DOES IT LOOK? In the head section, add a style tag Goes inside the style tag, add css code. CSS code goes here CSS code looks different than html code. Syntax for CSS code is: selector {property:value} selector {property:value; property:value;…}

HOW DOES IT WORK? selector: Name of the tag. For example Body, p, h1 etc property: the property you want to change for example the colour, font, background image etc value: the value you want to give the property. For example 14 px, blue etc

CSS PRACTICE Create the following webpage using the script below: CSS example body {background-color: red} h1 {background-color: green} h2 {background-color: yellow} p {background-color: blue} div {background-color:blue; color:white; font-size:4em} This is a heading1 This is a heading2 This is a heading 3 This is a div tag This is a paragraph

HOW TO SPECIFY TEXT SIZE? h1 {font-size: 12em or 12px, or 12pt or 12%} em is the unit for the calculated size of a font. So "2em", for example, is two times the current font size. px (such as font-size: 12px) is the unit for pixels. pt (such as font-size: 12pt) is the unit for points. % (such as font-size: 80%) 80% of the original size.

CSS COLORS CSS brings 16,777,216 colors to your disposal. body {background-color: “red” or “#ff0000”} red #ff0000 There are 17 valid predefined colour names. They are aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow.

TEXT COLOR AND BACKGROUND COLOR PROPERTIES Text color property: color Background color property: background-color Examples h1 { color: yellow; background-color: blue; }

CHANGING THE FONT TYPE Property: font-family This is the font itself, such as Times New Roman, Arial, or Verdana. The font you specify must be on the user's computer( 'safe' fonts are arial, verdana and times new roman) Examples: h1 {font-family: arial, helvetica}

CHANGING THE SIZE OF YOUR FONT Size of your font: font-size Be careful with this - text such as headings should not just be a paragraph in a large font; you should still use heading tags (h1, h2 )h1 h2 Example: p {font-size: 14px}

MAKE IT BOLD AND/OR ITALIC Property for bold: font-weight Example h2 {font-weight: bold} Property for italic: font-style Example h3 {font-style: italic}

UNDERLINE TEXT Property: text-decoration text-decoration: overline, which places a line above the text. text-decoration: line-through, strike-through. text-decoration: underline text-decoration: none Example a {text-decoration: underline, color:blue}

TRANSFORM TEXT Property: text-transform text-transform: capitalize turns the first letter of every word into uppercase. text-transform: uppercase turns everything into uppercase. text-transform: lowercase turns everything into lowercase. text-transform: none

ID AND CLASS SELECTORS What is you have 2 paragraphs that you want to look different? p {color: blue} changes the style of all paragraphs! There are other ways select elements to style. They are called ID and CLASS selectors

ID SELECTOR HTML code I’m paragraph 1! I’m paragraph 2! CSS code #para1 {color:red} #para2 {color:blue}

CLASS SELECTOR HTML code I’m paragraph 1! I’m paragraph 2! CSS code.para1 {color:red}.para2 {color:blue}

WHAT’S THE DIFFERENCE? An id can only be used once. I’m the only red allowed! HaHa A class can be used many times I’m blue I’m blue too!

Thanks to J.Hubbard for some examples in this presentation