Which is why we ll now be learning how to write in CSS (or cascading sheet style)

Similar documents
Introduction to WEB PROGRAMMING

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

2. Write style rules for how you d like certain elements to look.

Web Design and Development ACS-1809

Assignments (4) Assessment as per Schedule (2)

Using Dreamweaver CC. 6 Styles in Websites. Exercise 1 Linked Styles vs Embedded Styles

Welcome Please sit on alternating rows. powered by lucid & no.dots.nl/student

CSS Cascading Style Sheets

CSS مفاهیم ساختار و اصول استفاده و به کارگیری

COMS 359: Interactive Media

.hedgehog { background-image: url(backyard.jpg); color: #ffff99; height: 6in; width: 12in; } .tube {

Three Ways to Use CSS:

CSS Quiz Result. 2) Where in an HTML document is the correct place to refer to an external style sheet?

CSS: Cascading Style Sheets

Using Dreamweaver CS6

CS 350 Internet Applications I Name: Exam II (CSS) October 29, 2013

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Block & Inline Elements

By completing this practical, the students will learn how to accomplish the following tasks:

E , Fall 2007 More with stylesheets

Unit 20 - Client Side Customisation of Web Pages. Week 2 Lesson 3 Introduction to CSS

Cascading Style Sheets Level 2

COMS 359: Interactive Media

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

APPLIED COMPUTING 1P01 Fluency with Technology

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

CSS Cascading Style Sheets

Using Dreamweaver CS6

DAY 4. Coding External Style Sheets

Introduction to Cascading Style Sheet (CSS)

week8 Tommy MacWilliam week8 October 31, 2011

CST272 ASP.NET Style Sheets Page 1

The Benefits of CSS. Less work: Change look of the whole site with one edit

CSS: The Basics CISC 282 September 20, 2014

CSS - Cascading Style Sheets

CISC1600-SummerII2012-Raphael-lec3 1

Using Dreamweaver CS6

Html basics Course Outline

RAVASMARTSOLUTIONS - TECH TIPS

CSS Tutorial Part 1: Introduction: A. Adding Style to a Web Page (3 options):

Cascading Style Sheet. Styles as Tag Attributes. Syntax. <h1>: what font type/size is used? STYLE = SELECTOR {RULES} Attributes such as bgcolor

Stylesheet Fundamentals

HTML and CSS MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

HTML and CSS: An Introduction

Positioning in CSS: There are 5 different ways we can set our position:

HTML & CSS. Lesson 1: HTML Basics Lesson 2: Adding Tables Lesson 3: Intro to CSS Lesson 4: CSS in more detail Lesson 5: Review

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Introduction to CSS. 2 Sep 13. Derek Peacock. An introduction to defining CSS style rules using tags, classes and ids.

Introduction to Web Programming and Design

Introduction to Multimedia. MMP100 Spring 2016 thiserichagan.com/mmp100

1 Creating a simple HTML page

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

HTML & CSS. Rupayan Neogy

CREATING A WEBSITE USING CSS. Mrs. Procopio CTEC6 MYP1

Wanted! Introduction. Step 1: Styling your poster. Activity Checklist. In this project, you ll learn how to make your own poster.

CS134 Web Site Design & Development. Quiz1

Faculty of Engineering Department of Computer Engineering. CSS Tutorial. Eng. Ahmed J. Alajrami

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

CSS. Introduction to. Meganadha Reddy K. Technical Trainer NetCom Learning

Unveiling the Basics of CSS and how it relates to the DataFlex Web Framework

Introduction to Web Tech and Programming

Styles, Style Sheets, the Box Model and Liquid Layout

HTML/XML. HTML Continued Introduction to CSS

Lab: Create JSP Home Page Using NetBeans

**Method 3** By attaching a style sheet to your web page, and then placing all your styles in that new style sheet.

Using Dreamweaver CC. Logo. 4 Creating a Template. Page Heading. Page content in this area. About Us Gallery Ordering Contact Us Links

Scripting for Multimedia LECTURE 5: INTRODUCING CSS3

CSS worksheet. JMC 105 Drake University

Creating and Building Websites

HTML/CSS. HTML review and extra CSS review CSS Color

ITNP43: HTML Lecture 4

INFORMATICA GENERALE 2014/2015 LINGUAGGI DI MARKUP CSS

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

How the Internet Works

HTMLnotesS15.notebook. January 25, 2015

Cascading Style Sheets (CSS)

BIM222 Internet Programming

CSS: formatting webpages

Shane Gellerman 10/17/11 LIS488 Assignment 3

HTML/CSS Lesson Plans

CSS is applied to an existing HTML web document--both working in tandem to display web pages.

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar with Dynamic Background Image

CSCB20 Week 7. Introduction to Database and Web Application Programming. Anna Bretscher Winter 2017

Lesson 5 Introduction to Cascading Style Sheets

Chapter 3 Attractive Web Designing

Creating a CSS driven menu system Part 1

Web Publishing Basics I

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Basic CSS Tips and Tricks

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

AP CS P. Unit 2. Introduction to HTML and CSS

Overview. Part I: Portraying the Internet as a collection of online information systems HTML/XHTML & CSS

INTRODUCTION TO HTML5! CSS Styles!

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

How to create and edit a CSS rule

What do we mean by layouts?

HTML & CSS Cheat Sheet

Transcription:

STYLE WITH CSS My word is changing things in HTML difficult! Can you imagine if we had to do that for every single thing we wanted to change? It would be a nightmare! Which is why we ll now be learning how to write in CSS (or cascading sheet style) In CSS the syntax is this: Tag{ Property:value; So if you wanted to change ALL the p statements in your html document to pink then you would write P{ Color:pink; Sounds pretty great right? You will end every statement with a semicolon (;) You can do this with every tag you have in your html document (ex: html, head, body, h1, p, img) Even better yet you can use your CSS document for multiple html documents so you don t have to keep rewriting code! All of the properties you will be using are the same as the ones you used in your HTML document. Now this time you won t need any quotation lines. Such as: Font-family: Font; Font-size: #px; Color: chosen color; Background-color: chosen color; How can we use CSS though? There are two methods: Internal and external.

INTERNAL: With this method we can put the CSS code right into our HTML document This is beneficial if we can only open up one document at a time (which happens on a lot of online coding sites such as thimble) To do this we put the CSS code into our html document with the <style> tag It will go right after our body tag <body> </body> <style> </style> Tag { Property:value; External: The next method gives us the most freedom since we can independently change our CSS document without making any changes to our HTML document and we can reuse it for multiple documents. To do this we need to link our CSS file to our HTML file in our head tag. The format is this: <head> <link rel="stylesheet" type="text/css" href="the_file_name.css"> <head> So as you can see there are three parts to the link Rel= stylesheet and type= text/css will always be included and will be written like the above example everytime the href variable changes with what you decide to name you CSS document. So If I named my CSS document file_1 the link would look like this: <link rel= stylesheet type= text/css href= file_1.css > CHALLENGE 1: Lets get a CSS document

1)Save your file as a CSS file by choosing save as:

2) link the file using: <link rel="stylesheet" type="text/css" href="the_file_name.css"> 3) Do a test to see if you ve linked it properly, change all of your words in your document to a different color! Some examples of properties for styling in CSS http://ss64.com/css/ http://www.blooberry.com/indexdot/css/propindex/all.htm STYLING with Borders: To add a border to your images and words you use the following command Border: color #px style; The styles allowed are: There is one other thing we can do to really change the look of our boxes and images It is:

Border-radius: #px; What it will do is round the edges of your object, the larger number of pixels you put the more extreme this effect will become. Selecting Exactly the right variable! So far we ve seen that selecting any variable in your css spreadsheet with result in all of those variables in gaining the properties you ve given them. But what if you only want one line of text or one image to be changed? Or what if you want the whole document to change? To change EVERYTHING The universal selector symbol is *, if you put *{ Color:red;

Then whatever piece of text of hyperlink you have in the document will be changed to this default until you over-ride it with another command. To change ONE thing! Now if you want a specific image or line of text there are a couple different ways we can do it. First of all if you put the <span> tag around any object it will be selected so you can change individual words Like putting this

So as you can tell all of the objects will stay green unless it is over-ridden with another command. But what if I don t want all span properties to be the same? Heres where the ID command comes in Format: Id=chosen name It can go inside any tag after the initial property like <p> really <span id=name>really</span> Then we link it in css by putting #name{ For example:

SELECTING WITH CLASS: While ID lets us select one element on a page class lets us select multiple different properties and set them to the same property. It is set in any tag just like the ID property like so: <tag class=chosen name> This time the css looks like this:.chosen_name{ Note that a. is used instead of the # symbol. We can use it like so:

Now everything with that class has been made bold even though it was applied to a span, h1, and h2 tag.