Doman’s Sections Information in this presentation includes text and images from www.w3schools.com.

Slides:



Advertisements
Similar presentations
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Advertisements

Cascading Style Sheets
Today CSS HTML A project.
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.
SM5312 week 11: CSS Menus & Navigation Bars1 An Introduction to Cascading Style Sheets CSS Menus and Navigation Bars Nick Foxall.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
กระบวนวิชา 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.
Cascading Style Sheets Scripting with Style. CSS versus HTML  Ways to format in HTML –HTML Tag extensions –Converting Text to images –Page Layout with.
Cascading Style Sheets Controlling the Display Of Web Content.
4.01 Cascading Style Sheets
CSSMR.Mostafa badr1. Lesson 3 Creating an Style Sheet Lesson 2 Structure of the Style Lesson 1: What Cascading Style Sheets are?
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
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 CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
CSS Dvijesh Bhatt.
Cascading style sheets (CSS)
1Computer Sciences Department. And use
New Perspectives on XML, 2nd Edition Tutorial 5 1 TUTORIAL 5 WORKING WITH CASCADING STYLE SHEETS.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
WDV 101 Intro to Website Development
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
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.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
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.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
Tutorial #4 Formatting Text and Links. Tutorial #3 Review - CSS CSS format Selector { property1: value1; /* Comments */ } Embedded, In-Line, and External.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
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.
HTML: Hyptertext Markup Language Doman’s Sections.
More CSS.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
CSS Class 2 -Add margins to elements on a page. -Set width and height of elements. - CSS shorthand properties for box model. -Style links. -Style tables.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
Principles of Web Design 6 th Edition Chapter 9 – Site Navigation.
DIV, Span, CSS.
Cascading Style Sheets (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
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.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Copyright © 2006, Jumail, FSKSM, UTM Slide 1 Cascading Style Sheets (CSS)
CSS – Cascading Style Sheets
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Developing Web Applications with HTML and CSS “Selectors and Properties”
IS1825 Multimedia Development for Internet Applications Lecture 12: IDs, Classes and Internal CSS Rob Gleasure
CSS: Cascading Style Sheets Part II. Style Syntax.
1 CSS محمد احمدی نیا 2 Of 21 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements 
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
1 CS428 Web Engineering Lecture 07 Font, Text & Background (CSS - II)
Welcome To Website Design, Hosting And Management Prepared By Webdev Solution ip ,223,96.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 4 Formatting Text and Links.
NAVIGATION USING HTML TO SET UP THE BASIC STRUCTURE OF A NAV BAR.
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.
1 Cascading Style Sheets
Madam Hazwani binti Rahmat
Cascading Style Sheets
Cascading Style Sheets (Layout)
Chapter 7 Page Layout Basics Key Concepts
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Basics of Web Design Chapter 7 Page Layout Basics Key Concepts
Presentation transcript:

Doman’s Sections Information in this presentation includes text and images from

 Add an image  Add style to each of the following elements:  Background  The heading elements  The text in the paragraphs  One or all of your links  Each list  Each table  Float some element to the right side of the page

 Add images to webpage by using a single HTML tag, the image source tag  Key is getting the location correct

Save your images in the same folder as your html file.

 Alternate attribute – This provides text for browsers that don’t have graphic capabilities.  It also provides the text shown when the input pointer hovers over the image.

 Secure the size of the image displayed – height and width attributes  These can be specified in units of  Percentage of the page real estate  Actual pixels

 Use the anchor tag to surround the image tag. This makes the image the hyperlink text:

 Add an image  Add style to each of the following elements:  Background  The heading elements  The text in the paragraphs  One or all of your links  Each list  Each table  Float some element to the right side of the page

 CSS stands for Cascading Style Sheets  Set of rules that determine how the styles are applied to the HTML tags in the document (1).  Syntax of CSS Rules consist of: 1. Selectors 2. Declarations [1] Sam’s Teach Yourself HTML in 10 Minutes, SAMS Publishing; Indianapolis IN, 2007

 Selectors HTML tags that receive the style  Declarations The style sheet properties and their values

Embedded tags are placed in the section and affect the entire file. Inline … Linked <head 1.

 All styles are defined a the top of the HTML document within the tag.  They contain information about the entire document!

<head> <style type=“text/css”> </style> </head> body{ } background :blue;

CSS properties used for background effects:  background-color : Sets the background color of an element  background-image: Sets the background image for an element  background-repeat : Sets if/how a background image will be repeated  background-position: Sets the starting position of a background image  background-attachment : Sets whether a background image is fixed or scrolls with the rest of the page Tutorial Link

 color : Sets the color of a text  text-align: Aligns the text in an element  vertical-align: Sets the vertical alignment of an element  text-decoration: Adds decoration to text  text-transform: Controls the letters in an element  text-indent: Indents the first line of text in an element Tutorial Link

 font-family: Specifies the font family for text  font-size: Specifies the font size of text  font-style: Specifies the font style for text  font-weight: Specifies the weight of a font Tutorial Link

 Set different list item markers for ordered lists  Set different list item markers for unordered lists  Set an image as the list item marker  list-style-type: Specifies the type of list-item marker  list-style-image: Specifies an image as the list- item marker Tutorial Link

 border: specify table borders  border-collapse: sets whether the table borders are collapsed into a single border or separated  width and height: specifies the width/height of the element Tutorial Link

 An element can be pushed to the left or right, allowing other elements to wrap around it.  Float is useful for both images and layouts img { float:right; }

 Elements are floated horizontally, this means that an element can only be floated left or right, not up or down.  A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.  The elements after the floating element will flow around it.  The elements before the floating element will not be affected. Tutorial Link

Links are 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 mouse sits over it  a:active - a link the moment it is clicked These are called CSS pseudo-classes Links can be style with any CSS property (e.g. color, font-family, background-color). Tutorial Link

a:link {color: pink;} /* unvisited link */ a:visited {color: red;} /* visited link */ a:hover {color: blue;} /* mouse over link */ a:active {color: green;} /* selected link */

 Add an image  Add style to each of the following elements:  Background  The heading elements  The text in the paragraphs  One or all of your links  Each list  Each table  Float some element to the right side of the page

h1 { color:”red”; } This causes all text surround by an tag to be red. What if I want only one or some tags to be red? CSS allows selectors "class". These selectors provide the ability to differentiate which tags are associated with the format

 Specifies a style for any HTML elements with the same class.  Defined by a “.”  Referenced in the class attribute of the HTML element

 Classes can affect all HTML elements that associate with the class  Classes can be attached to specific HTML elements..yellowClass {color:yellow;} h1.redClass { color:red; } h1.blueClass{color:blue;} h1 {color:green; }

Indicate class name as an attribute of the tag: Red Heading Blue Heading Yellow Heading Other headings Tutorial Red Heading Blue Heading Yellow Heading Other headings

In your homework, you can use the class attribute in each of your structures: Paragraphs Lists Tables Images Anchors Then add styling formats to the class selector in the head section

 The "first-letter" pseudo-element is used to add a special style to the first letter of a text: p:first-letter { color:#ff0000; font-size:xx-large; } Y ou can use the :first- letter pseudo-element to add a special effect to the first character of a text! Tutorial Link

 Allows the user to navigate the website  Must be clear in purpose and easy to find  Navigation menus are usually on all pages  Normally along the top or left side of the page

 Create 2 more pages by copying the one created.  Change the title tag on the page.  Save as.html files with a new name

 List of links.  Use the anchor tag to link to your 2 nd and 3 rd page.  Link each page to the other two.  You can use text or an image to link the pages.

First page First page First page

 Key is getting the location correct Remember to use the complete URL with http prefix  …. OR…..

Save all html document files in the same folder. Specify : text

 Navigation bar can be a list of links. So, add style characteristics to the list to make it look more like what we want 1. Remove bullets or numbers 2. Make the whole area around the word ‘clickable’ 3. Display vertical or horizontal navigation bar

Remove bullets or numbers -> tag the list selector ul { list-style-type:none; margin:0; padding:0; }  list-style-type:none - Removes the bullets. A navigation bar does not need list markers  Setting margins and padding to 0 to remove browser default settings

Make the whole area around the word ‘clickable’ -> style the anchor selector a { display:block; width:60px; }  display:block - Displaying the links as block elements makes the whole link area clickable (not just the text), and it allows us to specify the width  width:60px - Block elements take up the full width available by default. We want to specify a 60 px width

Display vertical or horizontal navigation bar -> style the list item selector Use either display or float attributes li { display:inline; … } li { float:left; } display:inline; - By default, elements are block elements. Removing the line breaks before and after each list item, displays them on one line float:left - use float to get block elements to slide next to each other Tutorial Link

 Used to add special effects to some selectors.  Syntax: selector:pseudo-element {property:value;}

 The tag defines a division or a section in an HTML document.  The tag is often used to group block-elements to format them with styles. This is a header This is a paragraph. Tutorial Link

Feel free to look at the examples provided by w3schools.com. Use these techniques to format your own pages: CSS EXAMPLES Tutorial

 Ethics and Privacy  Midterm in 2 weeks