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.

Slides:



Advertisements
Similar presentations
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.
Advertisements

กระบวนวิชา 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.
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.
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.
Today’s objectives Site performance Padding, Margins, Borders
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.
Tutorial 4: Creating page layout with css
Working with Cascading Style Sheets
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.
Basics of Web Design Chapter 6 More CSS Basics Key Concepts 1.
Text Properties, Line Box, CSS. Text Properties Properties related to the display of text. Text-align : left, right, center I like FSU!
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
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.
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
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.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
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.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
CSS Introduction Cascading Style Sheets Provides a great deal of control over the presentation of the document HTML indicates both semantics of a document.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using 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.
Cascading Style Sheet Bayu Priyambadha, S.Kom. Definition Cascading Style Sheets (CSS) form the presentation layer of the user interface. –Structure (HTML)
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
CHAPTER 3 CSS & CSS3 อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
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.
COMP213 – Web Interface Design
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
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.
Chcslonline.org Text –wrapping around Images. chcslonline.org To wrap text around an image, lets set up a style in our style sheet. open a new notepad.
>> The “Box” Model. Pre-requisite Create a new project in Netbeans called Week5 Create a new html file and name it box.html Create a new css file and.
 Cascading Style Sheets (CSS) ◦ Used to specify the presentation of elements separately from the structure of the document.  Inline style ◦ declare.
Week 8 – Part 2 Page Layout Basics Key Concepts 1.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  CSS Box Model  CSS properties for border  CSS properties for.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
REEM ALMOTIRI Information Technology Department Majmaah University.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
3.2 Cascading Style Sheets. 2 Positioning Elements Normally, elements are laid out on the page in the order that they are defined in the XHTML document.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.
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.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations SlideSet #5: Advanced CSS.
CSE 154 LECTURE 4: PAGE SECTIONS AND THE CSS BOX MODEL.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
HTML and Dreamweaver November 11th. Agenda Box Model Displaying and positioning elements – Padding – Margin – Float – Display – Position HTML Demo.
Cascading Style Sheet (CSS) SAMPLE IT133 Pengembangan Web.
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
Basic Webpage Design Cascading Style Sheet (CSS).
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,
PERSPECTIVES: TUTORIAL 4 CREATING PAGE LAYOUTS WITH CSS.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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,
Semester - Review.
WebD Introduction to CSS By Manik Rastogi.
CSS.
( Cascading style sheet )
Semester - Review.
Unit 3 - Review.
CSS Borders and Margins.
Presentation transcript:

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 Model 7. Border Properties, Padding/Margin Properties 8. Bold, Italic, Underline in CSS 9. Centering using margin:auto and Other Properties

Groups GroupTopics 1Tag, Attribute, Value, CSS Box Model 2CSS Rule Syntax + link, Centering using margin:auto 3Categories of Selectors, Bold, Italic, Underline in CSS 4Inline vs Block Tags, CSS Layout using Div 5Border Properties, Padding/Margin Properties, and Other Properties

Review Process 1. Groups of 5  Within each group nominate a leader  Each person in the group chooses one of the 5 review topics  Review your topic 2. Find your “expert group” on the topic that you chose.  As an “expert group” decide how each one of you is going to describe to your original group what your particular topic is  As a group create sample HTML code that demonstrates your area. Use all tags and attributes on Review screen. 3. Re-join your original group.  Each member of the group teaches what they learned in their “expert group” to the members of their group.

HTML

Tag, Attribute, Value   Heading 1  Opening tag Attribute Attribute value Opening tag Closing tag Tag content The forward slash indicates that the tag is closed

CSS

External Styles  Define external style sheet in the tag  Exercise  Open a new file in Notepad++  Select Language -> C ->CSS  Type a CSS rule for the tag that does the following:  Sets the color  Sets the font-family (i.e. verdana)  Save as mystyles.css where favorites.html is  Open favorites.html, add the tag to the page to point to mystyles.css

CSS – Rules  CSS Rule Syntax has 3 parts:  Selector  Property  Value Selector PropertyValue Rule

Categories of Selectors SelectorExampleDescription HTML tag P{ color:red; } Styles can be applied to each HTML tag ID #foo{ color:red; } Allows you to give a unique ID to any single element on the page Class.bar { color:blue; } Classes are a way to group some elements and give a style to only that group Pseudo-classa:link{ color:#FF0000; } CSS pseudo-classes are used to add special effects to some selectors Combinations of the above h1.bar { bgcolor:yellow; }

Inline vs Block Tags Block Elements  Have line break before and after  Contain inline elements and other block elements  Examples:   ~ ,  ,, Inline Elements  Have no line break before and after  Contain text and other inline elements  Examples:  Example of Block tags:Example of Inline tags:

CSS Layout  CSS Layout is about using DIVs to define boxes on a page to act as a page template, and hold specific pieces of content that may change across pages. div block Steps: 1.Set width and height of each block 2.Set a property for side by side 3.Fill each with what you want Let's look at Amazon.com as an example

CSS Box Model

Border Properties PropertyDescriptionExample Values border Specify thickness, style, color in order 10px solid #FF0000 border-colorColor to fill border#EDEDED border-widthWidth of border on all 4 sides10px border-styleStyle of border on all 4 sides none, hidden, dotted, dashed, double, groove, insert, outset, ridge, solid border Combined styles for width, style, color in that order 10px solid #FF0000 border-top, border-bottom, border-left, border-right Style for one side of the borders10px solid #FF0000 border-collapseremoves space between td borders. Use on border-collapse:collapse;

Padding/Margin Properties PropertyDescriptionExample Values padding Padding for all 4 sides: - One value for all 4 sides - In clock-wise order: Top Right Bottom Left 5px 2px 3px 3px 2px (T R B L ) padding-top, padding- right, padding-bottom, padding-left Padding for one side of the box10px margin Margin for all 4 sides: - One value for all 4 sides - In clock-wise order: Top Right Bottom Left 5px 2px 3px 3px 2px (T R B L ) margin-top, margin-right, margin-bottom, margin-left Margin for one side of the box 10px PropertyDescriptionExample Values float Set a block to one side of the page The floating block must have a width left, right, none clearTurns off float effectsleft, right, both, none display How an HTML element should be display. {display:none} hides the element and does not take up any space. inline, block, none visibilityShow or hide an element. {visibility:hidden} hides the element but still takes up the same space. visible, hidden

Centering using margin:auto  Set margin: auto  Set a specific width.

Bold, Underline, Italic Property Example Description text-decoration text-decoration:none; decoration values: none, overline, line-through, underline, blink font-style font-style:italic;italic text. Can also have value:normal; font-weight font-weight:bold;sets bold font. Can also have value:normal;

Other Properties Property Example Description color color:red;sets text color background-color background-color:#0000FF;sets background color background-image background- image:url('paper.gif'); sets the background image background-repeat background-repeat:repeat-x;sets how the background image repeats text-align text-align:right; sets horizontal alignment of text and other tags within the tag; can also use center, left vertical-align vertical-align:top; sets vertical alignment of text and other tags within the tag. can also use middle, bottom font-family font-family:"Goudy", "Garamond", serif; sets font names, chosen in order if they exist on the computer. use serif or sans-serif as generic font names font-size font-size:20px;sets font size list-style-type list-style-type:circle;sets bullet type for lists on and tag. Width width:30px; height:50px;sets width or height of the tag. Can also use %, width:50%; Float float:left; (must be combined with width) sets a div to allow content to flow to the right of it