CSS Cascading Style Sheets

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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
กระบวนวิชา 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.
Design, Formatting, CSS, & Colors 27 February, 2011.
Project Pertemuan 13 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
CSS Pertemuan 12 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
4.01 Cascading Style Sheets
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
The Characteristics of CSS
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.
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.
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
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 Basic (cascading style sheets)
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
IS1825: Developing Multimedia Applications for Business Lecture 1: Introduction to CSS Rob Gleasure
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.
Cascading Style Sheets Creating a Uniform Site. Style Sheets  Style sheets are used for conformity on a web page or web site.  Style sheets eliminate.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
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.
CSS Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
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.
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.
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.
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.
WebD Introduction to CSS By Manik Rastogi.
CSS.
Cascading Style Sheet.
CSS Cascading Style Sheets
Getting Started with CSS
CSS HTML and website development.
4.01 Cascading Style Sheets
Bare boned notes.
>> Introduction to CSS
Cascading Style Sheets
Madam Hazwani binti Rahmat
Introduction to Web programming
Cascading Style Sheet (CSS)
Introduction to web design discussing which languages is used for website designing
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Project.
Website Design 3
Cascading Style Sheets - Building a stylesheet
CSS.
DynamicHTML Cascading Style Sheet Internet Technology.
CS134 Web Design & Development
محمد احمدی نیا CSS محمد احمدی نیا
Working with Cascading Style Sheets (CSS)
Working with Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
DynamicHTML Cascading Style Sheet Internet Technology.
Training & Development
Web Design and Development
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Web Design & Development
Cascading Style Sheets
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
External Style Sheets.
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

CSS Cascading Style Sheets

Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Membuat Web sederhana dengan menggunakan CSS

Outline Materi Definition Creating an Internal Style Sheet Creating an External Style Sheet The Class Selector The Id Selector Defining Styles for Links Formatting Text with Styles Layout with Styles CSS Comments The Advantages of Using Style Sheets

CSS Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents. Syntax : The CSS syntax is made up of three parts : a selector, a property and a value. The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value.

CSS (cont..)  Body element will be displayed in black text color Example :  Body element will be displayed in black text color If  the value is multiple words, put quotes around the value  If you wish to specify more than one property, you must separate each property with a semicolon.  You can group selectors. All header elements will be displayed in green text color

Creating an Internal Style Sheet Internal style sheets are ideal for individual pages with lots of text. They let you set the styles at the top of your page that should be used throughout an HTML document At the top of your HTML document, between the <head> and </head> tags, type <style> Type the name of the tag and properties you wish to define Type </style>

Creating an Internal Style Sheet (cont..) 

Creating an External Style Sheet External style sheets are ideal for giving all the pages on your Web site a common look. If you plan to apply the style sheet to more than one page, you’re better off using external style sheets. Create a new text document Type the name of the tag and properties you wish to define Save the style sheet as Text Only and give it the .css extension. To use an external style sheet : In the head section of each and every HTML page in which you wish to use the style sheet, type <link rel=stylesheet type=“text/css” href=“url.css”>

Creating an External Style Sheet (cont..) The .css file The .html file

The Class Selector With the class selector you can define different styles for the same type of HTML element.

The Id Selector You can define styles for HTML elements with the id selector. The id selector is defined as a #. Instead of creating a whole class of HTML tags, you can also identify individual tags. Each id in an HTML document must be unique.

Defining Styles for Links You can change the background and foreground color of your links. A:visited  to change the appearance of links that the visitor has already clicked A:active  to change the appearance of links when clicked A:hover  to change the appearance of links when pointed to Example : 

Formatting Text with Styles Property Description font-family: familyname To set the font family font-style: italic/oblique/normal To create italics/oblique/normal text font-weight: bold/normal To apply bold/normal formatting font-size: sizept, e.g., 12pt To set the font size line-height: sizept, e.g., 12pt To set the line height color: #rrggbb To set the text color background: #rrggbb To set the text background text-align: left/right/center/justify To align text text-decoration: underline/overline/line-through/blink/none To underline/overline/line-through/blink text

Layout with Styles Property Description height: size, e.g., 200 Setting the element’s height width: size, e.g., 200 Setting the element’s width border-top/bottom/left/right: thin/medium/thick or sizepx Setting the border padding-top/bottom/left/right: size, e.g., 10 Adding padding around the element margin-top/bottom/left/right: size, e.g., 10 Setting the margins around an element Vertical-align: baseline/middle/sub/super/text-top/text-bottom/top/bottom Aligning elements vertically

CSS Comments Comments are used to explain your code, and may help you when you edit the source code at a later date. A comment will be ignored by browsers. A CSS comment begins with "/*", and ends with "*/"

The Advantages of Using Style Sheets Styles save time Styles are easy to change Computers are better at applying styles consistently than you are Styles let you control text in ways that are out of reach of HTML tags Styles make it easy to create a common format for all your Web pages