CSS (Cascading Style Sheets). CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add.

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
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
Cascading Style Sheets
Today CSS HTML A project.
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
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.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
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.
Cascading Style Sheets Controlling the Display Of Web Content.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
4.01 Cascading Style Sheets
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
CSS Style Rules Guang Tong, Zhan L;lo’p[ Css Style Rule Guang Tong Zhan Three ways to insert CSS 1 External style sheet 2 Internal style sheet 3 Inline.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
CSS – Presentation of Information. Types of Style Sheets External Embedded h1{color:red; font-family: Arial;} Inline Text is here.
18 People Surveyed HTML (HyperText Markup Language) HTML “tags” Describes structure Building blocks Headings, paragraphs, lists, links, images, quotes,
Cascading Style Sheets by Pavlovic Nenad by. Presentation Contents  What is CSS?  Why CSS?  Types of Style Sheets  Style Sheets Syntax  Box Formatting.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
WRT235: Writing in Electronic Environments CSS Classes, IDs, divs.
CO1552 – Web Application Development Cascading Style Sheets.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
A really fairly simple guide to: mobile browser-based application development (part 2, CSS) Chris Greenhalgh G54UBI / Chris Greenhalgh
CSS Cascading Style Sheets. Cascading Style Sheet (CSS) A cascading style sheet (CSS) is a set of rules that define styles to be applied to entire Web.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
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.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
CASCADING STYLE SHEET 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.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
Chapter 3 Designing Your Web Pages. Objectives What is CSS and Why it is needed How CSS looks and how to write it The different ways to add CSS code to.
1 Cascading Style Sheets
WebD Introduction to CSS By Manik Rastogi.
CSS.
Working with Cascading Style Sheets
Web Development & Design Foundations with XHTML
Web Basics: HTML/CSS/JavaScript What are they?
Getting Started with CSS
4.01 Cascading Style Sheets
>> Introduction to CSS
>> CSS Rules Selection
Cascading Style Sheets
Cascading Style Sheets (Layout)
Intro to CSS CS 1150 Fall 2016.
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Intro to CSS CS 1150 Spring 2017.
Styles and the Box Model
CS134 Web Design & Development
What are Cascading Stylesheets (CSS)?
Training & Development
Web Design & Development
4.01 Cascading Style Sheets
Web Programming and Design
Introduction to Cascading Style Sheets (CSS)
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CSS (Cascading Style Sheets)

CSS CSS – Cascading Style Sheets – Cascade because of the way CSS rules can stack on top of each other. Allows you to add style (color, bold, formatting, etc.) to a web page. CSS tells browsers how to display the HTML. – Headings should be bold and red. – Paragraphs should be left-aligned. Allows you to change the style in one place but affect the whole study. Allows you to separate the style from the HTML. Useful for more than just style. jQuery uses selectors!

CSS – It’s kind-of like a lens through which you look to see the document.

CSS - HTML The tag defines a block on the page. A tag defines a portion of text on a line. Both tags very useful to CSS. An "id" identifies the tag. Unique name. One per page. A "class" defines a group of tags. Multiple per page. Welcome to CSS! Attributes Opening Tag Closing Tag

CSS - RULES /* CSS comment */ selector { property: value; } /* CSS example All tags will have blue text and a black border around them. */ p { color: blue; border: 1px solid black; }

CSS - RULES In addition to HTML tags "ids" and "classes" can be used. The "#" is used for "ids" The "." for "classes" … #Q1_div { color: blue; }.question { border: 2px solid red; }

CSS - RULES Multiple selectors can be used to define a rule. A comma acts kind of like an "OR" and a space like a "AND". /* Change the text of Header 1 to blue for the question with id="Q1_div" */ #Q1_div.header1 { color: blue; } /* Give both headers and the footer a background color of gray. */.header1,.header2,.footer { background-color: #c0c0c0; }

CSS - DEFINED Hello tag can be anywhere but usually in the tag.-->.question { border: 2px solid red; } in tag.--> <link rel="stylesheet" type="text/css" href="[%GraphicsPath()%]mystyle.css">

CSS - PRIORITY Order of priority: – Inline, tag, external file. – The more specific you are in your rule the higher priority it has..header1 { background-color: blue; }.question.header1 { background-color: red; } /* Header 1 background color will be red. */

CSS –HOOKS HTML can have classes and ids that you can write CSS for.

CSS – BOX MODEL All HTML tags or elements can be considered as "boxes". The main "box" we use is the tag. The diagram below shows how the padding, border, and margin surround the content.

USEFUL CSS.header1 { background-color: blue; /*Box background color*/ padding: 10px; /*Padding between content and border*/ margin: 10px; /*Space surrounding border*/ font-size: 30px; /*Text size*/ color: #c0c0c0; /*Text color*/ display: none; /*Removes box. display:block shows it*/ width: 500px; /*Set width of box*/ border: 1px solid black; /*Draw 1px black border around box. Useful for debugging.*/ } /* See See Survey Settings(Style) section in SSI Web Help. */

CSS MOBILE The CSS below only applies to small screens (those 640 pixels wide or only screen and (max-width: 640px) { /* These styles only applied on screens 640px or less */.question { width: 100%; margin: 5px; }

CHROME DEVELOPER TOOLS Chrome Web Browser, Tools, Developer Tools (F12) Excellent tool for debugging (stepping through) JavaScript Excellent tool for inspecting HTML Excellent tool for inspecting CSS View errors in Console. DEMO