Intro to CSS CS 1150 Fall 2016.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
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.
Cascading Style Sheets
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.
Part 2 Introduction to CSS. CSS Syntax – class selector 1 With the class selector you can define different styles for the same type of HTML element. You.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
© 2004, Robert K. Moniot Chapter 6 CSS : Cascading Style Sheets.
กระบวนวิชา 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. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
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.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
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.
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
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.
CSS Basic (cascading style sheets)
IS 360 Declaring CSS Styles. Slide 2 Introduction Learn about the three ways to declare a style Inline / embedded / external Learn about the effect of.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Cascading Style Sheets I Embedded Style Sheets. Page Design ICSS 2Instructor: Sean Griffin What is a Style Sheet? A style sheet is a text file that contains.
INTRODUCING CSS What CSS does How CSS works Rules, properties, and values.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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.
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.
1 Cascading Style Sheets
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.
Fall 2016 CSULA Saloni Chacha
CSS Cascading Style Sheets
Web Basics: HTML/CSS/JavaScript What are they?
Getting Started with CSS
CSS: Cascading Style Sheets
>> Introduction to CSS
Introduction to CSS.
Cascading Style Sheets
INTRODUCTION TO HTML AND CSS
IS 360 Declaring CSS Styles
Madam Hazwani binti Rahmat
>> CSS Rules Selection
CX Introduction to Web Programming
Cascading Style Sheets (CSS)
CASCADING STYLE SHEET CSS.
Website Design 3
Cascading Style Sheets - Building a stylesheet
Intro to CSS CS 1150 Spring 2017.
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets™ (CSS)
DynamicHTML Cascading Style Sheet Internet Technology.
INTRODUCTION TO HTML AND CSS
Web Design and Development
Introduction to CSS.
Web Design & Development
Cascading Style Sheets
Cascading Style Sheets
Cascading Style Sheets - Building a stylesheet
External Style Sheets.
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Intro to CSS CS 1150 Fall 2016

How CSS Works CSS allows you to create rules that specify how the content of an element should appear CSS mostly involves learning the different properties you can use The key to understanding how CSS works is to imagine there is an invisible box around every HTML element

Block and Inline Elements\

CSS Rules CSS works by associating rules with HTML elements The rules govern how the content of specified elements should be displayed A CSS rule contains two parts: a selector and a declaration Example: p { font-family: Verdana; }

CSS Properties CSS properties affect how elements are displayed CSS declarations sit inside curly brackets and each is made up of two parts: a property and a value, separated by a colon Example h1, h3 { font-family: Verdana; color: purple: }

Using External CSS The <link> element can be used in an HTML document to tell the browser where to find the CSS file used to style the page The <link> element is an empty element, meaning it does not need a closing tag The <link> element should always be inside the <head> section It should contain three attributes: href – this specifies the path to the CSS file type – this attribute specifies the type of document being linked to (the value should be text/css) rel – this specifies the relationship between the HTML page and the file it is linked to

Using Internal CSS CSS can also be included in a page by placing them inside a <style> element, which usually sits inside the <head> section of the page The <style> element should use the type attribute to indicate that the styles are specified in CSS (the value should be text/css) Example: <style type=“text/css”> body { font-family: Verdana; } </style>

The Element Selector The element selector selects elements based on the element name Example: p { text-align: center; color: red; }

The id Selector The id selector uses the id attribute of an HTML element to select a specific element Example: #paragraph1 { text-align: center; color: red; }

The class Selector The class selector selects elements with a specific class attribute Example .center { text-align: center; color: red; }