WRT235: Writing in Electronic Environments CSS Backgrounds, colors, fonts.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets Color and Background Controls Border and Margin Controls (Boxes)
Advertisements

 CSS Presentation and layout is based on the CSS Box Model.  The CSS Box Model states that every element on a page is a rectangular box.  This includes:
CS4370/6370 Web Development Cascading Style Sheets (CSS)
Week 7 Web Typography. 2 Understanding Type Design Principles.
Web Design & Development Cascading Style Sheets (CSS)
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
TUTORIAL 4: CREATING PAGE LAYOUT WITH CSS Session 4.3.
1 Cascading Style Sheets C S S. 2 What is CSS? A simple mechanism for controlling the style of a Web document without compromising its structure. It allows.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
3.1 Cascading Style Sheets. Motto Fashions fade, style is eternal. —Yves Saint Laurent.
W EB S ITE L ECTURE C ASCADING S TYLE S HEETS. Cascading Style Sheets (CSS) Introduction CSS Objectives – Provide more control over web site content presentation.
Cascading Style Sheets 1 Color and Backgrounds. Cascading Style Sheets 2 Color and Backgrounds Computer color basics Expression of color values using.
TECH2018 Multimedia and the Internet More about CSS and Page Layouts.
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Cascading Style Sheets Example
HTML - Quiz #2 Attendance CODE:
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
CSS in XHTML continued Please use speaker notes for additional information!
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Doman’s Sections Information in this presentation includes text and images from
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Using Cascading Style Sheet As you create more web pages, you may wish to impose a consistent look for all of your web pages or for group of related pages.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Cascading Style Sheets Chapter Four. What are they? A set of style rules that tell the web browser how to present a web page or document. Cascading Style.
Class three: CSS review, backgrounds, font formatting, the box model.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
11/6/13 MORE CSS!. TODAY’S AGENDA Review: float for positioning objects Review: CSS and color Introductions to: o CSS and images o CSS backgrounds o CSS.
WRT235: Writing in Electronic Environments Basic CSS.
Adding Graphics to Web Pages. CSS does not have any properties specifically aimed at formatting images Use properties you have already learned, i.e.,
Cascading Style Sheets in.NET Lilian Kiilu, Client/Server & Web Applications, Coms 463/563, Section 1pm, Fall 2005, November 16 th 2005.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
 Remember that HTML is just text  Need to point to pictures  Use the img tag  alt: › screen reader › REQUIRED for this class and to validate.
CSS Cascading Style Sheets. CSS Advantages Greater typography and page layout control Style is separate from structure Styles can be stored in a separate.
HTML - Quiz #2 Attendance CODE:
More CSS.
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
 2008 Pearson Education, Inc. All rights reserved Cascading Style Sheets™ (CSS)
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
Colors and backgrounds The following CSS properties will be explained: 1.color 2.background-color 3.background-image 4.background-repeat 5.background-attachment.
So far, we have looked at CSS selectors that correlate with HTML tags Now, we’ll see how you can define your own selectors using class and ID selectors.
DIV, Span, CSS.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 4 CASCADING STYLE SHEET G H E F.
REEM ALMOTIRI Information Technology Department Majmaah University.
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
Colors and backgrounds The following CSS properties will be explained: 1.color 2.background-color 3.background-image 4.background-repeat 5.background-position.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
Microsoft Expression Web-Illustrated Unit F: Enhancing a Design with CSS.
تقنيات الإنترنت وبرمجة الويب “ العملي “ أ. غادة الرواشدة 1 CSS Cascading Style Sheets.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Web Design (15) CSS Opacity, Link Colours & Background Images.
CIS234A Lecture 6 Instructor Greg D’Andrea. Span and Div The span and div elements are a generic means by which we can add structure to documents. The.
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Web Programming– UFCFB Lecture 11
Cascading Style Sheets™ (CSS)
Session IV Chapter 15 - How Work with Fonts and Printing
Presentation transcript:

WRT235: Writing in Electronic Environments CSS Backgrounds, colors, fonts

Agenda  Review: float for positioning  Review: CSS and color  Introduction:  CSS and images  CSS backgrounds  CSS and fonts

Why floats?  What do floats do?  What were floats originally designed for?

CSS and Color  color = font color  color can take hex codes, rgb values, or color names  What do we want?  Hex values – more precise, easy to take from our color palette  background or background-color = color behind element  background or background-color can take hex codes, rgb values, or color names

Short Activity: backgrounds  Create a new HTML doc in Thimble  Add the following to the document:  container with  2 headers  5 paragraphs of loren ipsum text  Embedded tags for CSS in the head of the document

CSS for object backgrounds: color  Working with solid colors  {background-color:red} or {background:red}  Works the same way for color declarations  Apply a background color to your headers

How to pick colors  Colors are hard  One way to know that colors work together is to look at a nature photograph  We understand what colors work and what don’t from the world around us. Colors in nature are natural colors to us

Tropical Fish

Tropical fish cont.

Color Resources   

CSS for object backgrounds: images  We can also use an image for a background  Can be applied to any object  Image -> css = image -> html  Declaration:  background-image: url(value);  Value can be absolute (full url) or relative (e.g., document in a folder that the HTML links to)  Give your #container a background from this url:  T52Z_400x400.jpeg

CSS for object backgrounds: images  We can adjust the size of the background image by adding another declaration using background-size  In the #container add:  background-size: VALUEpx #container { background-size: 200px; }

CSS for object backgrounds: images  Background images repeat horizontally and vertically  Control repetition  background-repeat: VALUE;  Options: repeat | repeat-x | repeat-y | no-repeat  Experiment  Set to repeat only horizontally  Set to repeat only vertically

CSS for object backgrounds: images  Define how a background scrolls  Usually limited to non-repeated backgrounds  Control attachment:  background-attachment: VALUE;  Options: scroll | fixed  Experiment  Set background-repeat to no-repeat  background-attachment: fixed

CSS for object backgrounds: images  Position where a background image appears  Control position:  background-position: VALUE;  Options: left, center, right, top, center, bottom  Choose both horizontal and vertical (e.g. left bottom)  Set background-repeat to no-repeat  background-position: top right;

Additional Readings  CSS Positioning of elements (not simply backgrounds)  of-css-position-values/

CSS and Fonts  font-weight: bold;  font-style: italic;  font-decoration: underline;

CSS Fonts: font-family  Define the specific font you want  Define “fallback fonts” – fonts to use if the browser can’t find the fonts you specify  Font-family: Century Gothic, Tahoma, sans-serif Try this firstSecond If nothing else works Third

Google Fonts  Google’s API allows you to link to their library of fonts  You can get started here:   2 basics:  You must have a link to the GoogleAPI font in the section of the your HTML page  You must list the Google fonts in your CSS

Typography choices are rhetorical choices  Fonts have a purpose beyond simply transmitting words  You must have a reason for your font choice, font-sizing, font weight, and font color  Using default fonts or using fonts that you always use or using fonts that you just like are not good reasons  Try to avoid using more than 2 different fonts  CRAP rules always apply

Font tips  Sans serif fonts are the most readable fonts on screen  Brightly color fonts can lead to reader fatigue  You will have the most flexibility in the selection of header typography.