Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements

Slides:



Advertisements
Similar presentations
1 © Netskills Quality Internet Training, University of Newcastle Introducing Cascading Style Sheets © Netskills, Quality Internet.
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Cascading Style Sheets
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
กระบวนวิชา 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.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
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.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 4: Horizontal Rules and Graphical Elements.
Design, Formatting, CSS, & Colors 27 February, 2011.
Marking Up With Html: A Hypertext Markup Language Primer
4.01 Cascading Style Sheets
Chapter 3 Adding Images in HTML. Agenda Understanding Web Page Images Prepare Your Images for the Web Insert an Image Specify an Image Size Add Alternative.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 4: Horizontal Rules and Graphical Elements © 2007 Prosoft Learning Corporation All rights.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
IT Introduction to Website Development Welcome!
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
HTML 4 Foundation Level Course HyperText Markup Language Most common language used in creating Web documents. You can use HTML to create cross-platform.
Department of Information Technology Chapter 8 - Creating Hypertext links Lecturer: Ms Melinda Chung.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
HTML, Part Showing Pictures: The Image Tags Image Tag Format –src short for source –alt for text –Can use absolute or relative pathname.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
Adobe Dreamweaver CS3 Revealed CHAPTER THREE: WORKING WITH TEXT AND IMAGES.
Adding Images Learning Web Design: Chapter 7. Using an Image Images have many purposed on a Web site Used as a static image To add illustration: ex. A.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
HTML. Adding Background Color The bgcolor attribute lets you change the background color of the Web page. Located in the body tag See common Web Page.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
Macromedia Dreamweaver 8 Revealed AND GRAPHICS WORKING WITH TEXT.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
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.
WebD Introduction to CSS By Manik Rastogi.
HTML Basics.
Getting Started with CSS
4.01 Cascading Style Sheets
Web Development & Design Foundations with HTML5 8th Edition
Marking Up with XHTML Tags describe how a web page should look
>> Introduction to CSS
Madam Hazwani binti Rahmat
Cascading Style Sheets contd: Embedded Styles
Cascading Style Sheets
Chapter 1: Introduction to XHTML (part 1)
Intro to CSS CS 1150 Fall 2016.
Web Development & Design Foundations with HTML5
Introduction to web design discussing which languages is used for website designing
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Web Development & Design Foundations with HTML5 7th Edition
Intro to CSS CS 1150 Spring 2017.
Fixed Positioning.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Cascading Style Sheets™ (CSS)
Tutorial 3 Working with Cascading Style Sheets
Web Design and Development
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
4.01 Cascading Style Sheets
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Hyperlinks, Images, Comments, and More…
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements

Lesson 3 Objectives Discuss Cascading Style Sheets Separate content in HTML Incorporate images in Web pages Discuss HTML entities Use the browser-safe color palette Use colors and images for page backgrounds Specify font information Consider Web design issues, including color combinations and page layout

Cascading Style Sheets A technology that adds formatting and structure to your pages A style sheet is simple text file that contains instructions If all pages on your site are linked to the same style sheet, then one simple change to the style sheet will change all specified elements across the site

Cascading Style Sheets (cont’d) CSS benefits include: Consistency Easy change management Currently, three standards exist for style sheets: Cascading  Style Sheets (CSS1)   Cascading Style Sheets 2 (CSS2) Cascading Style Sheets 3 (CSS3) HTML5 adopts CSS as the preferred way to format a page

Cascading Style Sheets (cont’d) CSS terminology: Selector – element to which designated styles are applied Property – changes the way a selector renders in a browser Value – defines a property Declaration – consists of a property and value Rule – consists of a selector, property and value

Cascading Style Sheets (cont’d) Proper CSS structure – place the opening and closing curly braces and each declaration on separate lines Inheritance – the style you define will flow, or cascade, throughout the documents, unless another style defined inside of a page specifically overrides it To apply CSS styles to HTML documents, you can: Declare an inline CSS style attribute Link to an external style sheet Create an internal style sheet

Separating Content in HTML Create a horizontal rule using the <hr> tag: <h1> Horizontal Rules </h1> <hr/> Horizontal rules: Lines used to make visual divisions in your document. Use CSS to stylize horizontal rules

Images in Web Pages Use the <img> tag to insert an image file The key attributes that are required in this tag are: src (abbreviation for source) alt (alternative text for the image if it cannot be seen) Image file formats Graphics Interchange Format (GIF) Joint Photographic Experts Group (JPEG) Portable Network Graphics (PNG)

Comparing Image File Formats

Using the alt Attribute with Images The alt attribute specifies alternative text to appear while the graphic is loading, or in place of the graphic in non-graphical browsers Every image used in HTML5 is required to contain the alt attribute with a corresponding value

Combining Background Images and Background Colors If you use a style sheet and specify both image and color as a background, then the background image will always render first If the image cannot be found, a background color will then appear

Aligning Images Relative to Text Use CSS to align images to text Alignment options include: bottom middle top left right

Resizing Images Specify image size using the following attributes: height width The syntax for these attributes is: <img src="imagename.gif" height="NumberOfPixels" width="NumberOfPixels"/> Specifying both height and width can distort an image; be sure to use proper proportions

HTML Entities The "less than" symbol < Uses code with ampersand (&) and semicolon (;) HTML entities include: The "less than" symbol < Code: < The "greater than" symbol > Code: > The copyright sign © Code: © or © The registered trademark sign ® Code: ® or ® Non-breaking space:  

Specifying Colors Colors can be specified by name or by Hexadecimal "Red Green Blue (RGB)" value

Browser-Safe Color Palette A set of 216 colors guaranteed to render properly Ensures that colors in pages render as expected If you specify a color not supported by the monitor or operating system, the system will approximate the color, a process called dithering Unexpected results may occur as the result of dithering

Page Colors and Backgrounds Specifying color for a page background: add the background-color property to the body selector in an external CSS file Specifying an image for a page background: add the background-image property to the body selector Specifying the color of text: Add the color property to the body selector Specifying the color of unvisited links: Use the <a:link> element Specifying the color of visited links: Use the <a:visited> element

Specifying Font Information CSS allows you to change the size, color and typeface of the text CSS supports many font-related selectors and properties, including: font-family font-size color

Web Design Issues Color combinations impose tone and mood Consider cultural and audience concerns Page layout guidelines: Be succinct Make sure that each page focuses on one topic Divide the page into three sections Include navigation aids Place comments in each section of code

Web Design Issues (cont’d) Basic HTML5 structural elements of a Web page:

Web Design Issues (cont’d) Page-layout methods to control the placement of Web page elements when rendered in the browser: Fixed-width layout Liquid layout Relative path names White space, the <img> tag and HTML

Lesson 3 Summary Discuss Cascading Style Sheets Separate content in HTML Incorporate images in Web pages Discuss HTML entities Use the browser-safe color palette Use colors and images for page backgrounds Specify font information Consider Web design issues, including color combinations and page layout