CSS for Styling Text.

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Intro To Cascading Style Sheets By Mario Yannakakis.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
HTML – A Brief introduction Title of page This is my first homepage. This text is bold  The first tag in your HTML document is. This tag tells your browser.
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.
Today’s Goals What is HTML?
Part 3 Introduction to CSS. CSS Text Text Styles h1 {color: green} // rgb(0,255,0), #00ff00 h2{letter-spacing: 0.5cm} // 2px h3 {text-align: right} //
กระบวนวิชา 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.
Web Design – Sec 4-6 and 4-7 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Font Families by Anthony Asay. Font Family ●Font family or font face is the typeface that is applied to the text by a web browser. ●There are a lot of.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
(CSS) More Details Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Working with Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 5.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
ALBERT WAVERING BOBBY SENG. Week 2: HTML + CSS  Quiz  Announcements/questions/etc  Some functional HTML elements.
Intro to CSS Christy. What is CSS?  Cascading Style Sheets  Separates content from presentation  Defines how to display HTML elements  Provides control.
CSS Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
CSS Cascading Style Sheets *referenced from
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
WebD Introduction to CSS By Manik Rastogi.
Cascading Style Sheets
HTML WITH CSS.
Web Development & Design Foundations with XHTML
CS3220 Web and Internet Programming CSS Basics
Style Sheets.
Understanding and Applying Typography in CSS
The Internet 10/11/11 Fonts and Colors
4.01 Cascading Style Sheets
HTML WITH CSS.
Introducing :CSS Cascading Style Sheets in 5 Lessons.
Introduction to CSS.
Applying Typography in CSS
Understanding and Applying Typography in CSS
Intro to CSS CS 1150 Fall 2016.
Introduction to web design discussing which languages is used for website designing
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
The Internet 10/13/11 The Box Model
CSS Style Sheets: Intro
Stylin’ with CSS.
Cascading Style Sheets Color and Font Properties
Web Development & Design Foundations with H T M L 5
Putting An Image on Your Web Page
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
Web Development & Design Foundations with H T M L 5
Web Development & Design Foundations with H T M L 5
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
CS3220 Web and Internet Programming CSS Basics
CSS Styles Fonts and Colors.
Introduction to CSS.
Lecture Review What is a hybrid app? What does a UI framework do?
CS3220 Web and Internet Programming CSS Basics
Lesson 5 Topic B – Basic Text & Fonts
Cascading Style Sheets - Building a stylesheet
Stylin’ with CSS.
4.01 Cascading Style Sheets
Stylin’ with CSS.
Session IV Chapter 15 - How Work with Fonts and Printing
One Set of Styles Connected to As Many Pages as You Want!!!
Cascading Style Sheets
Presentation transcript:

CSS for Styling Text

Again….CSS Cascading Style Sheet Write rules to apply styles to page content What can you style? Imagine the Possibilities: CSS Zen Garden Show students the CSS Zen Garden site. This site makes available an html page and a style sheet that graphic designers can use to submit their own styling of the page. As you select a design, ask students to notice how the content (text) of the page isn’t changing. Not changes are being made to the html file, only changes to the CSS used to apply styles to it. Have students note the extreme differences in style applications that have been provided as examples to this site.

Creating a CSS Rule Selector: what element to style? Property: what portion of element tweak? Value: sets value for that property

Selector Selector can be any html tag If selector is a tag, will apply style to all such tags on the page

Internal Style Sheet Define your styles in the actual html page Only applies to that page (this is just 1 of 3 options – see others later)

Where does the CSS go? <head> section After the meta tags Between two <style> tags Define as many style rules there as you need

How to set the values of certain properties

CSS Comments let you make notes to yourself about design Color of the Text Property: color Value: Hex-color code, or one of the color constants (words for colors) that Brackets offers Example: Hex code CSS Comments let you make notes to yourself about design Color constant

Color Behind Text Property: background-color Value: Hex-color code, or one of the color constants (words for colors) that Brackets offers Example:

Size of the Text Property: font-size Value: number value in pixels (there are other units we’ll see later) Example:

Font Weight Property: font-weight Value: Example: Number value: 100 (lightest) – 900 (boldest) bold | bolder | lighter | normal Example:

Font Choice Property: font-family Value: Example: Generalized kind of font: cursive, fantasy, monospace, sans-serif, serif Specific font, like arial, times new roman, etc. Example: If font name is more than one word, surround it with quotes If a font is not installed on the user’s computer, then it can’t be displayed, and the browser will try to compensate To deal with this, good idea to provide a list of fallback fonts – it will try each one you list from left to right and keep trying if a font is not available Can mix specific fonts and generalized kinds of fonts Good idea to make generalized kind of font the last option on the list and the browser will find a comparable font on the user’s computer to use List can be as many fallback fonts as you want

Line Height Property: line-height Value: number in pixels (other units possible we’ll see later) Example:

Alignment of Text Property: text-align Value: center | justify | left | right Example: