Computer Applications II.  A Style Sheet is a web page development tool that allows the developer to make global changes to a web page (or web site)

Slides:



Advertisements
Similar presentations
Intro To Cascading Style Sheets By Mario Yannakakis.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Introduction to CSS.
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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
กระบวนวิชา 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.
Week 7 Web Typography. 2 Understanding Type Design Principles.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
1 Creating Web Pages Part 3. 2 CASCADING STYLE SHEETS (CSS): What exactly are they? Set of rules that define how a web browser should display an HTML.
4.01 Cascading Style Sheets
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.
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
Chapter 8 Cascading Style Sheets (CSS). Agenda Definition of a CSS style Types of CSS Styles CSS Backgrounds CSS Text CSS Fonts CSS Links CSS Lists CSS.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
The Characteristics of CSS
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.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CIT Internet Based Programming Lecture notes: Week 4 Instructor:Dr. Tolgay KARANFİLLER.
What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External.
Cascading Style Sheets (CSS)
آموزش طراحی وب سایت جلسه چهارم– سی اس اس 1 تدریس طراحی وب برای اطلاعات بیشتر تماس بگیرید تاو شماره تماس: پست الکترونیک :
INTRODUCTION TO CSS. OBJECTIVES: D EFINE WHAT CSS IS. K NOW THE HISTORY OF CSS. K NOW THE REASON WHY CSS IS USED. CSS SYNTAX. CSS ID AND CLASS.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
Overview: 1. Discussion of the basic architecture of a web application. 2. Discussion of the relevance of using MySQL and PHP in a web application.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
CSS Font CSS font properties define the font family, boldness, size, and the style of a text. CSS Font Families Generic family Font familyDescription Serif.
CSS Basic (cascading style sheets)
CSS -- TEXT.  Text Color  The color property is used to set the color of the text.  With CSS, a color is most often specified by:  a HEX value - like.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
IS1825: Developing Multimedia Applications for Business Lecture 1: Introduction to CSS Rob Gleasure
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts.
DIV, Span, CSS.
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.
Introduction to CSS. What is CSS? CSS ("Cascading Style Sheets") determines how the elements in our XHTML documents are displayed and formatted. By using.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
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}
1 CSS محمد احمدی نیا 2 Of 21 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements 
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
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. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External.
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.
Cascading Style Sheet.
4.01 Cascading Style Sheets
Introduction to CSS.
Cascading Style Sheets (CSS)
Cascading Style Sheet (CSS)
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Cascading Style Sheets - Building a stylesheet
Introduction to CSS.
Cascading Style Sheets Color and Font Properties
محمد احمدی نیا CSS محمد احمدی نیا
What are Cascading Stylesheets (CSS)?
Web Development & Design Foundations with H T M L 5
Cascading Style Sheets (CSS)
CS3220 Web and Internet Programming CSS Basics
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
Presentation transcript:

Computer Applications II

 A Style Sheet is a web page development tool that allows the developer to make global changes to a web page (or web site) as opposed to changing every single page of the site individually.  It is the ‘skeleton’ of a web page that contains the minimum tags required to define and create a basic page.

 Used to define layout elements of a web page, much like a template. This allows the designer to define several attributes in a single place that are to be shared on pages throughout a site.  Less code to actually be typed, keeping sheets shorter and neater.  Appearance of site is more consistent.  Pages load faster and site accessibility is improved.  Editing and updating is faster and more efficient.

 Cascading Style Sheet (CSS) -- allows web page designers to attach style sheets containing specific information regarding the appearance of web pages, much like a template.  Internal style sheet – used for individual pages containing large amounts of text. The tag is placed inside the section of the HTML code. Attributes and tag properties are then listed inside curly braces { }.  External style sheet – used for numerous web pages that will make up a web site, requiring pages to have a consistent appearance. This is a separate text file, linked to web pages. An HTML tag is indicated, followed by tag properties in the same format as the internal style sheet. This page is then saved in a text-only format with a.css extension. The link can then be placed within the section of all pages to which the style attributes will apply.

 Browser Default  External Default  Internal Style Sheet (in the head section)  Inline Style (inside an HTML element)

 Three parts of syntax: ◦ Selector – HTML tag you wish to define ◦ Property – attribute you wish to change ◦ Value – each property can take a value  Example: ◦ Selector {property:value} ◦ body {color:black}

 If value is more than one word ◦ Put quotes around the value ◦ p {font-family:”sans serif”}  If more than one property is specified ◦ You must separate each property with a semicolon ◦ p {text-align:center;color:red}  Grouping selectors ◦ Separate each selector with a comma ◦ h1,h2,h3,h4,h5,h6 {color:green}

 Class Selector ◦ The class selector allows you to define different styles for the same type of HTML element ◦ p.right {text-align:right} ◦ p.center {text-align:center} ◦ This paragraph will be right- aligned ◦ This paragraph will be center- aligned  CSS Comments ◦ Comments are used to explain the HTML code-helps when code is edited later. Comments are ignored by browsers. ◦ /*This is a comment*/

 External ◦ Ideal when style is applied to many pages. Each page must link to the style sheet. CSS file does not contain HTML tags.  hr {color:sienna}  p {margin-left:20px}  body {background-image:url(“images/back40.gif”)}  Internal ◦ Used when a single document has a unique style.   hr {color:sienna}  p {margin-left:20px}  body {background-image:url(“images/back40.gif”)} 

 Inline Styles ◦ Use sparingly. Loses many of the advantages of style sheets.  This is a paragraph  Multiple Lines ◦ If multiple properties are set for the same selector in different style sheets-values will be inherited from the more specific sheet  External:  h3 {color:red;text-align:left;font-size:8pt}  Internal  h3 {text-align:right;font-size:20pt}  Properties for the h3 will be: color:red; text-align:right; font-size: 20pt

 Set by Name – specify a color name ◦ body {color:blue}  Set by RGB – specify an RGB value ◦ h2 {color:rgb(255,0,0)}  Set by HEX – specify a hex value ◦ h1 {color:#00ff00}

 Used to set horizontal alignment of text  Examples: ◦ h1 {text-align:center} ◦ p.date {text-align:right} ◦ p.main {text-align:justify}

 Used to set or remove decorations from text. Used primarily to remove underlines from links for design purposes  Examples: ◦ a {text-decoration:none} ◦ h2 {text-decoration:line-through}

 Used to specify uppercase and lowercase letters in text  Examples: ◦ p.uppercase {text-transform:uppercase} ◦ p.lowercase {text-transform:lowercase} ◦ p.capitalize {text-transform:capitalize}

 Used to specify indentation of first line of text  Examples: ◦ p {text-indent:50px}

 Family – Serif ◦ Have small lines at the ends on some characters ◦ Times New Roman, Georgia  Family – Sans Serif ◦ Fonts that do not have lines at the end of characters ◦ Arial, Verdana  Family – Monospaced ◦ All characters have the same width ◦ Courier New, Lucida Console  Setting Font Family ◦ Set with the font-family property. If font family is more than one word, use quotation marks. Specify several font names in case browser does not support first font ◦ p {font-family:”Times New Roman”,Georgia,Serif}

 Normal ◦ Text is shown normally ◦ p.normal {font-style:normal}  Italic ◦ Text is shown in italics (most common use of font- style property) ◦ p.italic {font-style:italic}  Oblique ◦ Text is leaning-similar to italic, but less ◦ p.oblique {font-style:oblique}

 Headings – Do not use font size adjustments to make paragraphs look like headings or headings look like paragraphs. Always use proper HTML tags, like -.  Absolute – Sets text to a specified size ◦ Does not allow a user to change text size in all browsers ◦ Useful when the physical size of the output is known  Relative – Sets the size relative to surrounding elements ◦ Allows a user to change the text size in browsers

 Set using Pixels ◦ Gives full control over the text size ◦ h1 {font-size:40px}  Set using EM ◦ Recommended by the W3C. 1em is equal to the current font size (default text size for browsers is 16px, so default of 1em is 16px) ◦ h1 {font-size:2.5em} /*40px/16=2.5em*/  Set using Combination of Percentage and EM ◦ Works in all browsers. Set a default font-size in % for body element ◦ body {font-size:100%} ◦ h1 {font-size:2.5em}