Definition CSS “Short for Cascading Style Sheets, a new feature being added to HTML that gives both Web site developers and users more control over how.

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
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.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
XP Introducing Cascading Style Sheets With Cascading Style Sheets (CSS), you can create one or more documents that control the appearance of some or all.
16 HTML Tables and Frames Section 16.1 Create a basic table using HTML Define borders Merge cells Align content in tables Section 16.2 Create a frames-based.
HCI 201 Week 6 Client Side Image Maps Introduction to CSS.
CSS Pertemuan 12 Matakuliah: L0182 / Web & Animation Design Tahun: 2008.
4.01 Cascading Style Sheets
Using Cascading Style Sheets (CSS) Dept. of Computer Science and Computer Information CSCI N-100.
JMD2144 – Lesson 5 Web Design & New Media. ‘Div’ide and conquer One of the most versatile structure tags available is the.. tag Short for ision, it allows.
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
Basics of HTML.
Cascading Style Sheet. What is CSS? CSS stands for Cascading Style Sheets. CSS are a series of instruction that specify how markup elements should appear.
HTML & CSS A brief introduction. OUTLINE 1.What is HTML? 2.What is CSS? 3.How are they used together? 4.Troubleshooting/Common problems 5.More resources.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
STYLING THE WEBSITE - EXTERNAL CSS BY JORGE MARTINEZ.
 ult.htm ult.htm  This website illustrates the use of CCS (style sheets)
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
DIY Web Development Hand Code Your Own Page (For Free!) by Bryan Brown, Indiana University Bloomington SLIS.
The Characteristics of CSS
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
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.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
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.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Cascading Style SHEETS for formatting and layout control CSS HTML HTML HTML HTML HTML.
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 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)
By Brieya. What is HTML Hypertext Markup Language, a standardized system for tagging text files to achieve font, colour, graphic, and hyperlink effects.
Cascading Style Sheets. What is CSS? Short for Cascading Style Sheets, a new feature being added to HTML that gives more control over how pages are displayed.
Unit 3 Day 6 FOCS – Web Design. Journal Unit #3 Entry #4 Write the source code that would make the following display on a rendered page: Shopping List.
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.
HTML Structure & syntax. Introduction This presentation introduces the following: Doctype declaration HTML Tags, Elements and Attributes Sections of a.
HTML: Hyptertext Markup Language Doman’s Sections.
Chapter 2 Web Page Design Mr. Gironda. Elements of a Web Page These are things that most web pages use.
INTRODUCTION TO CSS. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features of CSS Features of CSS  Creating Style Sheet Creating Style Sheet.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
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.
Cascading Style Sheets CSS. Source W3Schools
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.
Introduction to CSS. What is CSS? CSS ("Cascading Style Sheets") determines how the elements in our XHTML documents are displayed and formatted. By using.
Are You Smarter Than a 5 th Grader? 1,000,000 5th Grade HTML 5th Grade Syntax 4th Grade HTML 4th Grade Syntax 3rd Grade HTML 3rd Grade Syntax 2nd Grade.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
 Look especially at › File Tips and Shortcuts › Student video.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
External Style Sheets Exploring Computer Science – Lesson 3-6.
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.
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
Practice for Chapter 3: Assume that you are a freelance web designer and need to create a website to promote your freelance company.
Chapter 4 Frames and Cascading Style Sheets. Frames Frames divide a browser window into two or more separate pieces or panes, with each pane containing.
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 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.
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.
Web Basics: HTML/CSS/JavaScript What are they?
What are Cascading Stylesheets (CSS)?
Cascading Style Sheets III B. Com (Paper - VI) & III B
Presentation transcript:

Definition CSS “Short for Cascading Style Sheets, a new feature being added to HTML that gives both Web site developers and users more control over how pages are displayed. With CSS, designers and users can create style sheets that define how different elements, such as headers and links, appear. These style sheets can then be applied to any Web page. The term cascading derives from the fact that multiple style sheets can be applied to the same Web page.” -Webopedia.com Style Sheets Contents Basics “STYLE” as attribute “STYLE” as tag External CSS

Style Sheets: The Basics A Style sheet is essentially a series of definitions for how something will appear on your web page. It can be used to define something as simple as the color of text or as complex as the line height of a paragraph and the amount of space between letters. It can also be used position images and text absolutely on the page. The largest advantage of CSS is that you can control the appearance of many pages by just changing the file that contains the style definitions. That will be covered in “External CSS.” Mastering CSS will give you almost absolute control over how your page looks. And in Web Design, looks are half the battle.

Style Sheets: The Basics The syntax of CSS is different than HTML and Javascript. The basic definition looks like this: A colon(:) is used instead of an equal sign(=). So the example definition is stating that the color of what is being defined will be red. A series of definitions are divided by semi-colons(;) like this: These definitions can be placed inside the STYLE attribute inside of a tag or set up as “classes” inside of a area. color:red color:red; font-size:12; background-color:green

Style Sheets: “STYLE” Attribute The STYLE attribute can be placed in almost any tag from to to. The first example is of using it in the tag to control text. On the left is the code, on the right is the result. Hello World! Hello World

Style Sheets: “STYLE” Attribute I am now going to put that text inside of a table that also has a style attribute. Almost any tag can take the STYLE attribute, you just need to know what aspects of a tag you can change. Go to the links page of the class website to find good references of all the definitions and what they can be set to. Hello World!

Style Sheets: “STYLE” Tag Instead of using the STYLE attribute inside of every tag you want to change, you can declare a “class” of definitions that can be referred back to anywhere in the document. You must start with creating an area for those classes in between the within the like so: This is where you will declare your classes.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like All the definitions must be inside curly braces.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like Definition 1 All the definitions must be inside curly braces.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like Definition 1 Divided by semi-colon All the definitions must be inside curly braces.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like Definition 1Definition 2 Divided by semi-colon All the definitions must be inside curly braces.

Style Sheets: “STYLE” Tag Once again, we return to the importance of syntax. There are some strange symbols and punctuation used in declaring a class, and you must be precise or else it will not work. Here is the anatomy of a class declaration:.classname{color:#89FF00; font-size:30} Inside of the STYLE tags. The period is necessary You can name your class whatever you like Definition 1Definition 2 Divided by semi-colon All the definitions must be inside curly braces. You can put as many definitions into one class as you want. In addition, you can make as many classes as you want inside the tags.

Style Sheets: “STYLE” Tag Once you have declared your class, you can use it in the body of your page. Since this class is for text, I’m going to use the tag..classname{color:#89FF00; font-size:30} Hello World!

Style Sheets: “STYLE” Tag Once you have declared your class, you can use it in the body of your page. Since this class is for text, I’m going to use the tag..classname{color:#89FF00; font-size:30} Hello World! The text that you wish to change the style of must be within the tags.

Style Sheets: “STYLE” Tag Once you have declared your class, you can use it in the body of your page. Since this class is for text, I’m going to use the tag..classname{color:#89FF00; font-size:30} Hello World! The text that you wish to change the style of must be within the tags. CLASS is the attribute you use to name the class you are using

Style Sheets: “STYLE” Tag Once you have declared your class, you can use it in the body of your page. Since this class is for text, I’m going to use the tag..classname{color:#89FF00; font-size:30} Hello World! The text that you wish to change the style of must be within the tags. CLASS is the attribute you use to name the class you are using And, of course, you put the name of the class you want to use as the value The CLASS attribute can be used in as many different tags as STYLE. If you have declared a class for some aspect of your page, you can almost always put the CLASS attribute in the tag.

Style Sheets: External CSS By creating a class inside of your HTML document, you can use those definitions throughout the page and change the appearance of many elements just be changing one definition. However, if you have an external style sheet, you can change the appearance of many pages by just changing one definition in one file. This requires the creation of a.css file. The process is very similar to how you save an HTML file. And please remember, for this to work, the.css file needs to be in the same folder as the.html pages that are using its classes.

Style Sheets: External CSS To create an external style sheet: 1.Open a new notepad document. 2.Put in your class declarations just like you would inside of the tags (but you don’t put any HTML tags inside the document). Like so:

Style Sheets: External CSS 3. Then go to file->save. Make sure that you save your file as filename.css. Remember, the file name can be anything, you just have to remember to save it with a period (.) then css.

Style Sheets: External CSS 4.Finally, instead of putting in the HEAD, you put this very important line. Don’t worry about exactly what it means, just copy it exactly (but with the correct “filename.css”). 5.You may now use the classes in your.css file on any of your pages so that they have a uniform look and feel. If you decide to change what it looks like, you only need to change the definition in the.css file and it will change all of the pages using that class. Have fun. Hello World! Make sure you enter the file name as you saved it. Use the class that’s in the.css file just like normal.