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.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Advertisements

CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
Intro To Cascading Style Sheets By Mario Yannakakis.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Today CSS HTML A project.
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
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.
Slide 1 CMPS 211 Internet Programming Spring 2008 Dynamic Effects with Styles Chapter 12 2/6/08.
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.
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
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.
CSS Link Styling. The Anchor Element: Link text between the opening and closing can be styled using CSS. Some of the properties that can be set are: font-family,
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science
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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Client-Side Internet and Web Programming
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
1/18 ITApplications XML Module Session 5: Extensible Stylesheet Language (XSL)
CSS(Cascading Style Sheets )
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.
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:
Measurement Many CSS properties (values within the declaration) require that you specify a unit of measurement, such as spacing between elements, border.
Unit 20 - Client Side Customisation of Web Pages
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.
CSS Cascading Style Sheets Brief Introduction
More CSS CS HTML id attribute 2 Coding Horror! Our mission is to combine programming and “human” factors with geekiness! output  A unique ID for.
Design, Formatting, CSS, & Colors 27 February, 2011.
CSS Properties on Parade PropertyValid valuesExample font-familylist of fonts (separate with commas, end with generic font: serif, sans-serif, fantasy,
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 Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
ACM 262 INTRODUCTION TO WEB DESIGN Week-7 ACM 262 Course Notes.
1 CSS محمد احمدی نیا 2 Of 21 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements 
Understanding CSS Cascading Style Sheets control the presentation of content in HTML pages Style Sheets separate formatting from the content –Styles defined.
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Links All CSS properties can be applied on links (i.e. change colors, fonts, underline, etc). The new thing is that CSS allows you to define these properties.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
CSS.
Cascading Style Sheet.
Unit 3 - Review.
Cascading Style Sheets (Layout)
Chapter 7 Page Layout Basics Key Concepts
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
6 Layout.
The Internet 10/13/11 The Box Model
CSS Borders and Margins.
Cascading Style Sheets Color and Font Properties
CSS Styles Fonts and Colors.
Web Client Side Technologies Raneem Qaddoura
Introduction to Cascading Style Sheets (CSS)
Styling Links.
CGS 3066: Web Programming and Design Fall 2019 CSS Extra
Presentation transcript:

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 be styled differently depending on what state they are in.  The four links states are:  a:link - a normal, unvisited link  a:visited - a link the user has visited  a:hover - a link when the user mouses over it  a:active - a link the moment it is clicked

CODE a:link {color:#FF0000;} /* unvisited link */ a:visited {color:#00FF00;} /* visited link */ a:hover {color:#FF00FF;} /* mouse over link */ a:active {color:#0000FF;} /* selected link */ This is a link Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective. Note: a:active MUST come after a:hover in the CSS definition in order to be effective. RESULT Y:\SHS 09-10\Web Page Design\CSS\CSS- Link\link1.html

 When setting the style for several link states, there are some order rules:  a:hover MUST come after a:link and a:visited  a:active MUST come after a:hover

 Text Decoration  The text-decoration property is mostly used to remove underlines from links:  Example  a:link {text-decoration:none;} a:visited {text-decoration:none;} a:hover {text-decoration:underline;} a:active {text-decoration:underline;}

CODE   a:link {text-decoration:none;} /* unvisited link */  a:visited {text-decoration:none;} /* visited link */  a:hover {text-decoration:underline;} /* mouse over link*/  a:active {text-decoration:underline;} /* selected link */   This is a link  Note: a:hover MUST come after a:link and a:visited in the CSS  definition in order to be effective.  Note: a:active MUST come after a:hover in the CSS definition in order  to be effective.  RESULT  Y:\SHS \Web Page Design\CSS\CSS -Link\link2.html Y:\SHS \Web Page Design\CSS\CSS -Link\link2.html

 Background Color  The background-color property specifies the background color for links: a:link {background-color:#B2FF99;} a:visited {background-color:#FFFF85;} a:hover {background-color:#FF704D;} a:active {background-color:#FF704D;}

a:link {background-color:#B2FF99;} /* unvisited link */ a:visited {background-color:#FFFF85;} /* visited link */ a:hover {background-color:#FF704D;} /* mouse over link */ a:active {background-color:#FF704D;} /* selected link */ This is a link Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective. Note: a:active MUST come after a:hover in the CSS definition in order to be effective. Y:\SHS 09-10\Web Page Design\CSS\CSS-Link\link3.html

  a.one:link {color:#ff0000;}  a.one:visited {color:#0000ff;}  a.one:hover {color:#ffcc00;}  a.two:link {color:#ff0000;}  a.two:visited {color:#0000ff;}  a.two:hover {font-size:150%; background:#66ff66}  a.three:link {color:#ff0000;}  a.three:visited {color:#0000ff;}  a.three:hover {background:#66ff66;}  a.four:link {color:#ff0000;}  a.four:visited {color:#0000ff;}  a.four:hover {font-family:monospace;}  a.five:link {color:#ff0000;text-decoration:none;}  a.five:visited {color:#0000ff;text-decoration:none;}  a.five:hover {text-decoration:underline;}   Mouse over the links to see them change layout.  This link changes color  This link changes font-size  This link changes background-color  This link changes font-family  This link changes text-decoration 

Y:\SHS 09-10\Web Page Design\CSS\CSS- Link\link4.html

 Advanced – Create Link Boxes This example demonstrates a more advanced example where we combine several CSS properties to display links as boxes.

a:link,a:visited { display:inline; font-weight:bold; color:#FFFFFF; background-color:#98bf21; width:120px; text-align:center; padding:4px; text-decoration:none; } a:hover,a:active { background-color:#7A991A; text-decoration:underline; } This is a link

 Y:\SHS 09-10\Web Page Design\CSS\CSS- Link\link5.html Y:\SHS 09-10\Web Page Design\CSS\CSS- Link\link5.html