©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.

Slides:



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

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} //
9-May-15 More CSS. 2 A different emphasis CSS is the same for XML as it is for HTML and XHTML, but-- XML contains no display information If you want your.
Week 9 Using the Box Properties. 9-2 The CSS Visual Formatting Model Describes how the element content boxes should be displayed by the browser –Based.
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.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
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.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Web Design & Development Cascading Style Sheets (CSS)
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Cascading Style Sheets Part 3 Fall, 2007 Modified by Linda Kenney Nov. 12, 2007.
Cascading Style Sheets Cyndi Hageman. Applying a Style Sheet  In-line style – used within the HTML tag  Embedded Style Sheet – located in the HTML document.
CSE CASCADING STYLE SHEETS CSS Faculty of Computer Science and Engineering.
Using Cascading Style Sheets CSS Structure. Goals Understand how contextual, class and ID selectors work Understand how contextual, class and ID selectors.
Cascading Style Sheets1. 2 n Style sheets are a means of controlling the way HTML tags are formatted n IE introduced style sheets in IE 3.0 release n.
14-Jul-15 CSS Applications to XML. 2 A different emphasis CSS is the same for XML as it is for HTML, but-- HTML already does a pretty good job of layout.
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
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.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
Using Cascading Style Sheets. Introduction to Styles and Properties  Cascading Style Sheets (CSS) are a standard set by the World Wide Web Consortium.
Cascading Style Sheets Example
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
Cascading Style Sheets Billy Toy Cascading Style Sheets Syntax review How to Implement style sheets Background properties Text properties.
CSS Dvijesh Bhatt.
Chapter 7 Web Typography Principles of Web Design, 4 th Edition.
1.NET Web Forms CSS: Style Sheets © 2002 by Jerry Post.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets, pt 2 ECA 225 Applied Online Programming.
Cascading Style Sheets CSS. CSS - Structure Declaration block Property: identifies what to change Value: how to change it Selector – example h1{ font-size:
WORKING WITH CASCADING
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
1 To Create an Internal Style Sheet 1. At the top of your HTML document, between the and tags type. 2. Type the name of the tag whose properties you wish.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
CSS My favourite ICT lesson By Federico Boschi Cascading 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.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Cascading Style Sheet Bayu Priyambadha, S.Kom. Definition Cascading Style Sheets (CSS) form the presentation layer of the user interface. –Structure (HTML)
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
 2008 Pearson Education, Inc. All rights reserved Cascading Style Sheets™ (CSS)
INTRODUCTORY Tutorial 4 Exploring Graphic Elements and Images.
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.
Cascading Style Sheets Part 3 Spring, 2008 Modified by Linda Kenney April 21, 2008.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
3. Cascading Style Sheets (CSS) M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer.
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 CS428 Web Engineering Lecture 08 Border, Margin, Padding … (CSS - III)
Copyright © 2006, Jumail, FSKSM, UTM Slide 1 Cascading Style Sheets (CSS)
CIS234A Lecture 5 Instructor Greg D’Andrea. Font Styles Review Font-Family: generic family, font family Font-Size: em, pt, px, %, mm, cm, in Font-Style:
CSS – Cascading Style Sheets
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
CSS: Cascading Style Sheets Part II. Style Syntax.
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Tutorial #5 Working with the Box Model. Tutorial #4 Review - CSS Create a homework page Final Project Discussion Exam on Blackboard Styling Lists (List-style-type,
Tutorial 3 Designing a Web Page with CSS
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.
CSS Details Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  To use CSS properties for fonts  Evaluate whether to use pts,
Welcome To Website Design, Hosting And Management Prepared By Webdev Solution ip ,223,96.
Unit 3 - Review. Topics 1. Tag, Attribute, Value 2. CSS Rule Syntax + link 3. Categories of Selectors 4. Inline vs Block Tags 5. CSS Layout 6. CSS Box.
WebD Introduction to CSS By Manik Rastogi.
The Internet 10/13/11 The Box Model
Cascading Style Sheets
Cascading Style Sheets™ (CSS)
Presentation transcript:

©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets

©SoftMoore ConsultingSlide 2 Reasons to Use CSS Saves work and time –changes appearance of one or more webpages by editing one document –easier to maintain Improves accessibility by separating content from appearance Allows more functionality and control over web design than HTML alone Maintains small file sizes – centralizes display instructions into one file or location Cascades styles – allows multiple styles to be integrated into one hierarchy

©SoftMoore ConsultingSlide 3 Adding CSS to HTML External –separate CSS file –linked from HTML Internal –defined within HTML Inline –defined within HTML tag

©SoftMoore ConsultingSlide 4 External Best Use: group of similar looking pages Separate CSS text file –List of rules; no tags or HTML –File extension is.css Linked within HTML tag Examples <link rel="stylesheet" type="text/css" href="filename.css"> <link rel="stylesheet" type="text/css" href="

©SoftMoore ConsultingSlide 5 Internal Best Use: one uniquely styled page Defineded within HTML <!-- hide from old browsers h1 {color: blue ; } -->

©SoftMoore ConsultingSlide 6 Inline Best Use: one individually styled element Defined within HTML tag Example: Four score and seven year ago... Recommendation: Use this option sparingly

©SoftMoore ConsultingSlide 7 Syntax Basic Syntax: selector {property: value;} Example: h1 {color: blue;} Selector: an HTML element –p– ul –h1-h6– body –div– etc. Property: Manipulates the selector’s style or format –font– color –margin– etc. Value: Gives the property details on how to behave –2 PX– center –bold– etc.

©SoftMoore ConsultingSlide 8 More Syntax Two word Values h2 {font-family: 'sans serif';} ul {list-style: upper-roman;} Multiple Properties p {text-align: center; font: Times;} or p { text-align: center; font: Times; } Group Selectors h1, h3, h4 {color: blue;}

©SoftMoore ConsultingSlide 9 ID & Class Selectors Used when the same element needs to appear differently on the same web page ID –used only once in an HTML document –Style: #name { property: value; } –HTML: Hello Class –applied to many elements in an HTML document –Style:.name { property: value; } –HTML: How are you? –Style: h1.name { property: value; } –HTML: Fine, thanks.

©SoftMoore ConsultingSlide 10 Hyperlink Formats Pseudo-classes –don’t show in HTML markup –uses within the document body Examples a:link { font-size: 15px; } a:visited { color: yellow; } a:active { background-color: #000000; }

©SoftMoore ConsultingSlide 11 Text Properties text-indent: can be negative used mainly for block elements ( div, blockquote, pre ) text-align: center | right | left | justify replaces align = "center" line-height: increases or decreases vertical space between lines vertical-align: baseline | sub | super | bottom | text-bottom | middle | top | text-top especially useful for image placement within text

©SoftMoore ConsultingSlide 12 Text Properties (continued) word-spacing: and letter-spacing: increases or decreases horizontal space between words or letters text-decoration: none | underline | overline | line-through | blink can be used to suppress the underlining of hyperlinks

©SoftMoore ConsultingSlide 13 Font Properties Font styles in CSS replace the tag in HTML font-family: | family | backup family –Times, Helvetica, Arial, Comic Sans, etc. –use single quotes ( ' ), not double quotes ( " ) font-weight: normal | bold | bolder | lighter | , 200, etc. are weights of boldness (higher numbers provide stronger bold) font-style: italic | oblique | normal oblique is a slantiness somewhere between normal and italic font-variant: small-caps | normal allows for upper case letter of different sizes

©SoftMoore ConsultingSlide 14 Box and Border Properties width: height: margin: can be negative margin-top, margin-bottom, margin-right, margin-left padding: –cannot be negative padding-top, padding-bottom, padding-right, padding-left

©SoftMoore ConsultingSlide 15 Box and Border Properties (continued) border: border-top, border-bottom, border-right, border- left border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset border-width: thin | medium | thick | border-top-width, border-bottom-width, border-right-width, border-left-width

©SoftMoore ConsultingSlide 16 Float, Clear, and Lists float: left | right | none allows text to be wrapped around an element clear: left | right | both | none prohibits floating elements from interfering/overlapping with other elements (similar to ) list-style: | | list-style-type: disc | circle | square | decimal | upper-alpha | lower-alpha | upper-roman | lower-roman | none list-style-image: list-style-position: inside | outside

©SoftMoore ConsultingSlide 17 Comments Comments can be used to help explain a statement or code. Comments are ignored by browsers /* Comments go between symbols like these */ Comments can span over multiple lines.

©SoftMoore ConsultingSlide 18 Units and Values Named color –aqua– maroon– etc. –taken from original Windows VGA colors –Example: p {color : red; } RGB color –hexadecimal (#rrggbb) –Example: a:link {color : #ffff00; } Background Image body {background-image: url(image.jpg); } h2 {background-image: url( } Note: No whitespace between “url” and the beginning parentheses.

©SoftMoore ConsultingSlide 19 Unit and Value Lengths Absolute lengths –not recommended for web display (better for print) –too dependent on operating system and monitor –cm, in, pc (picas), mm, pt (points) Relative lengths adjust to screen resolution, width of viewing area, user preferences –em (em-height) - equals font height –ex (x-height) - equals height of a lowercase ‘x’ –px (pixels) - equals one dot on a screen best for images and good for web display possible printing size problems