Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.

Slides:



Advertisements
Similar presentations
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
MIS 425 Lecture 2 – HTML Navigation, Colors, tables and Styles Instructor: Martin Neuhard
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 7 Page Layout Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
HyperText Markup Language (HTML) Uses plain text to add markup instructions to a file. If you can't produce it with a standard keyboard, it can't go into.
Principles of Web Design 5 th Edition Chapter Nine Site Navigation.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
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.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
Chapter 8 Creating Style Sheets.
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.
16 HTML Tables and Frames Section 16.1 Create a basic table using HTML Define borders Merge cells Align content in tables Section 16.2 Create a frames-based.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Chapter 8 More on Links, Layout, and Mobile Copyright © 2013 Terry Ann Morris, Ed.D revised by Bill Pegram, 9/24/
Page Layout & Mobile Web Using columns, grid systems, etc… to layout sites for desktops and mobile.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Week 8 – Part 3 More on Links, Layout, and Mobile Key Concepts 1.
1 Web Developer & Design Foundations with XHTML Chapter 3 Key Concepts.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Principles of Web Design 6 th Edition Chapter 9 – Site Navigation.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 7 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with HTML5 7th Edition
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 6 Key Concepts.
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
Web Developer & Design Foundations with XHTML
Web Development & Design Foundations with HTML5
Cascading Style Sheets (Layout)
Web Development & Design Foundations with HTML5 7th Edition
Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with HTML5 8th Edition
Web Development & Design Foundations with HTML5
Cascading Style Sheets
Chapter 8 More on Links, Layout, and Mobile Key Concepts
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Web Development & Design Foundations with H T M L 5
Basics of Web Design Chapter 8 More on Links, Layout, and Mobile Key Concepts Copyright © 2014 Terry Ann Morris, Ed.D.
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with XHTML
Web Development & Design Foundations with HTML5
Web Development & Design Foundations with HTML5
Presentation transcript:

Web Development & Design Foundations with XHTML Chapter 7 Key Concepts

Learning Outcomes In this chapter, you will learn how to : Code relative hyperlinks to Web pages in folders within a Web site Configure a hyperlink to a fragment identifier internal to a Web page Add interactivity to Web pages with CSS pseudo-classes Configure a navigation layout list with CSS Configure three-column page layouts using CSS Configure CSS for screen, print, and mobile device display Utilize the “cascade” in CSS 2

More on Relative Linking Contact Collars Home Dog Bathing 3 Relative links from the home page: index.html

Opening a Link in a New Browser Window The target attribute on the anchor element opens a link in a new browser window or new browser tab. Yahoo! 4

XHTML Linking to Fragment Identifiers A link to a part of a Web page Also called named fragments, fragment ids Two components: 1.The element that identifies the named fragment of a Web page. This requires the id attribute. ….. 2. The anchor tag that links to the named fragment of a Web page. This uses the href attribute. Back to Top 5 Note the use of the # in the anchor tag!

CSS Pseudo-classes Pseudo-classes and the anchor element ◦ link – default state for a hyperlink ◦ visited –a hyperlink that has been visited ◦ focus – triggered when the hyperlink has focus ◦ hover – triggered when the mouse moves over the hyperlink ◦ active – triggered when the hyperlink is being clicked a:link {color:#000066;} a:visited {color:#003366;} a:focus {color:#FF0000;} a:hover {color:#0099CC;} a:active {color:#FF0000;} a:link {color:#000066;} a:visited {color:#003366;} a:focus {color:#FF0000;} a:hover {color:#0099CC;} a:active {color:#FF0000;}

CSS Pseudo-classes a:link { background-color: #ffffff; color: #ff0000; } a:visited { background-color: #ffffff; color: #00ff00; } a:hover { background-color: #ffffff; color: #000066; text-decoration: none; } 7

Styling CSS “buttons” 8

CSS “buttons” #button a { border: 2px inset #cccccc; padding: 3px 15px; color: #FFFFFF; background-color: #000066; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; text-align: center; text-decoration:none; } #button a:link { color: #FFFFFF; } #button a:visited { color: #CCCCCC; } #button a:focus { color: #DDA0DD; background-color:#000000; border:2px outset #000000; } #button a:hover { color: #66CCFF; border:2px outset #cccccc; } #button a:active { color: #DDA0DD; border:2px outset #000000; } 9 CSS Buttons! Home Products Services Contact About

Navigation Layout Using Lists Navigation hyperlink areas are sematically “lists" of links Some web design gurus argue that navigation links should be configured using XHTML list elements Use the list-style-image property to configure the “bullet" list-style-image:url(arrow.gif). 10

CSS & XHTML Navigation List CSS: div#leftcolumn ul { list-style-image:url(arrow.gif); } div#leftcolumn a { text-decoration:none; } XHTML: Home Spring Summer Fall Winter 11 twocolumn1.html

CSS & XHTML Navigation List XHTML: Home Spring Summer Fall Winter CSS: div.nav li { display:inline; list-style-type:none; } div.nav a { padding:5px; background-color:#e8b9e8; color:#000066; text-decoration:none; font-family:Verdana, Arial, sans-serif; text-align:center; } div.nav a:link {color:#000066; background-color:#e8b9e8; } div.nav a:visited {color:#000000; background-color:#cc66cc; } div.nav a:focus {color:#cccccc; background-color:#000000} div.nav a:hover {color:#ffffff; background-color:#cc66cc; } div.nav a:active {color:#cccccc; background-color:#cc66cc; } CSS: div.nav li { display:inline; list-style-type:none; } div.nav a { padding:5px; background-color:#e8b9e8; color:#000066; text-decoration:none; font-family:Verdana, Arial, sans-serif; text-align:center; } div.nav a:link {color:#000066; background-color:#e8b9e8; } div.nav a:visited {color:#000000; background-color:#cc66cc; } div.nav a:focus {color:#cccccc; background-color:#000000} div.nav a:hover {color:#ffffff; background-color:#cc66cc; } div.nav a:active {color:#cccccc; background-color:#cc66cc; } home0.html

Checkpoint State a reason to use an unordered list to configure navigation links. 2. You are using CSS pseudo-classes on a Web page to configure the navigation links to look like buttons. You want the “regular” links in the Web page content to be configured as they normally would (not look like a button). Describe how you could configure the styles and XHTML to accomplish this.

Three Column Page Layout A common Web page layout consists of a header across the top of the page with three columns below: navigation, content, and sidebar. If you are thinking about this layout as a series of boxes—you’re thinking along the right lines for configuring pages using CSS! 14

Three Column Layout container sets default background color, text color, and an minimum width Left-column navigation ◦ float: left; ◦ width:150px; Right-column content ◦ float: right; ◦ width:200px; Center column – uses the remaining screen room available room after the floating columns display ◦ margin: 0 200px 0 150px; Footer – clears the float ◦ clear:both; 15

CSS Styling for Print Create an external style sheet with the configurations for browser display. Create a second external style sheet with the configurations for printing. Connect both of the external style sheets to the web page using two elements. 16

CSS Styling for the Mobile Web eMarketer.com predicts million mobile Internet users by 2013 Three Approaches to Mobile Web: ◦ Develop a new mobile site with a.mobi TLD ◦ Create a separate Web site hosted within your current domain targeted for mobile users ◦ Use CSS to create a style sheet to configure your current Web site for display on mobile devices.

Mobile Web Limitations Small Screen Size Low bandwidth Limited fonts Limited color Awkward controls Lack of Flash support Limited processor and memory Cost per kilobyte

Design Techniques for Mobile Web One column design Avoid floats, tables, frames Descriptive page title Descriptive heading tags Optimize images Descriptive alt text for images Elminate unneeded images Navigation in lists Provide “Skip to Content” hyperlink Provide “Back to Top” hyperlink Notice the overlap between between these techniques and designing to provide for accessibility?

The Cascade This “cascade” applies the styles in the order of precedence. Site-wide global styles can be configured in the external CSS. Styles can be overridden when needed for a specific page or element.

Checkpoint State an advantage of using CSS to style for print. 2. Describe how to choose whether to configure an XHTML tag, create a class, or create an id when working with CSS. 3. List the following terms in the order that the properties and attributes are applied when using CSS.  Inline styles  External styles  XHTML attributes  Embedded styles 21

Summary This chapter introduced you to a variety of topics related to hyperlinks, lists, and layout. 22