>> Introduction to CSS

Slides:



Advertisements
Similar presentations
Tables Feb. 14, Tables Great way to organize and display information Laid out in columns and rows Think of an excel spreadsheet Defined with tag.
Advertisements

Cascading Style Sheets
Introduction to HTML & CSS
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.
Cascading Style Sheets
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
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.
1 Styles and CSS David Douglas Sam M. Walton College of Business, University of Arkansas “Connecting scholarship and research with business practice”
FORMATTING IN CONTEXT. FOLLOW UPS ANCHOR POINTS MUST BE UNIQUE  If you have more than one, how does it know where to go?  They can be repeated across.
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. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
4.01 Cascading Style Sheets
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
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.
Robert Vitolo CS430.  CSS (Cascading Style Sheets)  Purpose: To provide a consistent look and feel for a set of web pages To make it easy to update.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Introduction To CSS.. HTML Review What is HTML used for? Give some examples of formatting tags in HTML? HTML is the most widely used language on the Web.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
INTRODUCTION TO CSS. OBJECTIVES: D EFINE WHAT CSS IS. K NOW THE HISTORY OF CSS. K NOW THE REASON WHY CSS IS USED. CSS SYNTAX. CSS ID AND CLASS.
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.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Building Optimised Web Sites with CSS Folkert Klemme.
Course created by Sarah Phillips BBCD Melbourne BAPDCOM Version 1 – April 2013.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
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.
CSS Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
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.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
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.
Introduction To CSS. Lesson 1: History of CSS CSS was proposed in 1994 as a web styling language. To helps solve some of the problems HTML 4. There were.
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
Introduction to CSS: Selectors
Cascading Style Sheets (CSS) Internal Style Sheets Classes
Getting Started with CSS
4.01 Cascading Style Sheets
>> CSS Rules Selection
Cascading Style Sheets (CSS)
Introduction to Web programming
Cascading Style Sheets (Layout)
Intro to CSS CS 1150 Fall 2016.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
Intro to CSS Mr. Singh.
>> Dynamic CSS Selectors
CS134 Web Design & Development
Introduction to Cascading Style Sheets (CSS)
Web Programming– UFCFB Lecture 11
What are Cascading Stylesheets (CSS)?
CSS Styles Introduction.
Web Design and Development
Web Design & Development
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Web Programming and Design
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

>> Introduction to CSS

Separation of Concerns Presentation Styles the Tags Provides Tags (Elements) Structure Functional Modify the Tags Web-based Systems | Misbhauddin

Introduction - CSS Cascading Style Sheets Add Style & Layout to Webpages Fonts, Colors, Spacing controlled by the CSS file Why CSS? Separates Content from Presentation Look-and-Feel can be updated independently

Web-Based Systems - Misbhauddin How to do it in CSS <h1> Welcome to the your first CSS Lecture </h1> HTML <h1 style=“color:red”> Welcome to the your first CSS Lecture </h1> HTML with presentation h1 { color: red; } CSS Web-Based Systems - Misbhauddin

Web-Based Systems - Misbhauddin The “CSS” Contents Consists of CSS Rules Rules are composed of declarations Always put a semicolon after each declaration Rule Structure Selector Declaration h2 {color: red;} Property Value Web-Based Systems - Misbhauddin

Web-Based Systems - Misbhauddin Adding CSS to HTML There are three locations to add CSS to HTML We will talk about them later in the course Steps to add CSS to HTML Create <style> ….. </style> element inside the <head> element Each CSS rule is written inside the <style> element This method is called Internal CSS Web-Based Systems - Misbhauddin

TRY NOW Add a level 1 header with any text Change the header’s color is red, the font family is Georgia and the font size is 32px Use properties color font-family font-size HINTS:

Attribute “id” & “class” Each element (tag) in HTML can have an “id” attribute and a “class” attribute Difference “id” value is unique to a particular element “class” value can be shared by multiple elements

Selector Types in CSS Element (Type) Selector ID Selector Just use the tag name in the CSS Selector field h1 {color: red;} ID Selector Use “#” before the name of the id in CSS Selector field #title {color: red;} <h1 id=“title”>Welcome</h1> Class Selector Use “.” before the name of the class in CSS Selector field .headings {color:red;} <h1 class=“headings”>Welcome</h1>

TRY NOW Add two paragraphs to your page with any text Now change the font color of the “second” paragraph to green Assign id attributes to the respective tag in HTML HINTS:

TRY NOW Add one more paragraph to your page Now change the font size of the “first” and “third” paragraph to 10 Assign class attributes to the respective tags in HTML HINTS:

Combining Selectors Apply same style to different selectors Use “comma (,)” to separate the selector names in the CSS Rule Eg h1, h2 { color: red; }

TRY NOW Center align the heading & the first paragraph Use the property text-align HINTS:

Next on Web-based Systems Cascading Style Sheets More on CSS Selectors Using to format the layout of an HTML page Using <div>, <span> tags and CSS code More on CSS Benefits http://csszengarden.com