Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.

Slides:



Advertisements
Similar presentations
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
Advertisements

Building a Website: Cascading Style Sheets (CSS) Fall 2013.
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.
Session Objectives Setting the font family Setting the font size Working with Web fonts Setting font faces and sizes Setting font and text appearances.
Cascading Style Sheets (Formatting. Slide 2 Lecture Overview At this point, you have learned how and where to create styles You have not learned much.
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.
Tutorial 3 Introducing Cascading Style Sheets. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Learn about Cascading Style Sheets Write.
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Week 7 Web Typography. 2 Understanding Type Design Principles.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
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.
+ Text & Font Styles Unit 3 Lesson Different Font Categories Sans Serif – block style fonts Example - Rockwell Easy to read and good to use when.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
Formatting Text (Plus More Selectors) Learning Web Design: Chapter 12.
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.
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).
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
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.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WDV 101 Intro to Website Development
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
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.
 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.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
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.
CO1552 – Web Application Development Cascading Style Sheets.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
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.
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.
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.
INTRODUCTORY Tutorial 3 Using CSS to Format Multiple Pages.
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.
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,
Cascading Style Sheets Web Design Fairport High School.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
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 *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;
Tutorial 3 Designing a Web Page with CSS
CSCE Chapter 3 (Cascading Style Sheets) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department of Computer.
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.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
CSS Details Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  To use CSS properties for fonts  Evaluate whether to use pts,
Cascading Style Sheets Robin Burke ECT 270. Outline CSS properties Fonts Alignment Color CSS selection selectors.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
CSS.
CS3220 Web and Internet Programming CSS Basics
( Cascading style sheet )
Cascading Style Sheets Color and Font Properties
CS3220 Web and Internet Programming CSS Basics
CS3220 Web and Internet Programming CSS Basics
Presentation transcript:

Tutorial #3 Cascading Style Sheets

Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission

Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local Links Page2

Cascading Style Sheets (CSS) CSS – Used to format the web page Bold, Italics, fonts, outlining, highlighting, positioning Advantages Consistency Easy modification of a lot of code More flexible formatting.

CSS – Style Rule A style sheet is a collection of rules Format Selector { property1: value1; property2: value2; property3: value3; … }

CSS – Style Rule h1{ color: yellow; text-align: center; } Colors (color: color_value;) Name, Hex code, RGB triplet Black, #000000, RGB(0,0,0) Page 141 has a list. On the web colorhttp:// color

CSS Inline Style Sheet Orange Embedded Style Sheet Wrapped in tags Put in the head section style rules

CSS – Embedded Style h1 { color: blue; text-align: center; } h2 { color: green; }

CSS – Lab 1. Modify Firstpage.html – Add Color to h1 and h2 tags using CSS 2. Move“hello world” inside of a paragraph tag if it’s not already there. h1 { color: blue; } h2 { color: green; }

External Style Sheets Styling across multiple pages can be handled with external css Used a link element in the head section Same code but in its own file Good practice for styling to build it locally then copying the CSS to an external file

The Link Element Link element is used to link an external style sheet into a web page. Placed in the head section

CSS - Comments Comments In CSS comments are wrapped in /* */ /* Everything In here Is a CSS Comment */

CSS Background Color In CSS background-color h1{ background-color: gray; color: blue; }

CSS CSS styles can be applied for all HTML elements a { color: orange; } body{ background-color: white; }

Fonts Font is a distinct set of characters Font Family – A set of fonts with similar characteristics In CSS the font-family property can be used change the font. Font-family: Font1, Font2, …, GenericFont; Font-family: “Times New Roman”, Times, serif; Fonts with spaces need to be in quotes.

Fonts - Size Font-size: size; Unit of Measurements Absolute units Relative units Centimeters (cm)/Millimeters (mm) Inches (in) Points (pt) – 1/72 of one inch Pixels (px) Em – Roughly equal to the size of the letter M Percent

CSS – More text formatting Italic – In CSS use font-style Bold – In CSS use font-weight h2{ font-style: italic; font-weight: bold; } HTML5CSS Font-weight: bold; Font-style: italic;

Transforming Text Capitalize – Capitalized the first letter of each word Lowercase Uppercase None – Removes and of the other values h1 { text-transform: uppercase; }

Transforming Text Other text options: Letter-spacing White space between letters Word-spacing White space between words Text-indent How much to indent the first line of each paragraph Line-height White space between lines.

Text Transform - Lab Modify your firstpage to have 1. h1 tags in uppercase 2. h2 in lowercase 3. Change the paragraph font to "Courier new", monospace 4. Change paragraph font size to 2em; 5. Add a CSS Comment at the start of the style saying This style provided by: 6. Add letter spacing to h4 to 25px;

CSS – Font Shorthand For fonts you could type out all properties or use the shorthand Does not have to have all but needs to be in order Font style Font weight Font variant Font size Font family h3{ font: italic bold 1em Courier monospace; }

CSS- Text Alignment Can use text-align property Left Right Center Justify h1{ text-align: center; }

CSS – Anchor Underline Anchor tags (links) can be modified with CSS Text-decoration can be used to modify the default underline of a link Options are none, underline (done by default), overline or line-through a{ text-decoration: none; } This can be useful for setting up a menu of links where you don’t want the line.

CSS - Lab Modify firstpage_css.hml: 1. Make the h4 tag in italics (Using CSS) 2. Add a link to (if it’s not there) 3. Modify the link to have an overline style 4. Modify the link to have a font-size of 3em; 5. Change the background-color of the body to be #00FFFF and paragraph to #90EE90

CSS Validation Validate the CSS similar to the way we did the HTML Can alert of possible errors