{color:blue; font-size: 12px;}



Similar documents
What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

ITNP43: HTML Lecture 4

Outline of CSS: Cascading Style Sheets

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Creating a Resume Webpage with

HTML5 and CSS3 Design with CSS Page 1

Cascading Style Sheets (CSS)

Using Style Sheets for Consistency

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

Web Authoring CSS. Module Descriptor

Web Design for Print Designers WEB DESIGN FOR PRINT DESIGNERS: WEEK 6

Contents. Downloading the Data Files Centering Page Elements... 6

CHAPTER 10. When you complete this chapter, you will be able to:

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

CSS - Cascading Style Sheets

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Introduction to Adobe Dreamweaver CC

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

CST 150 Web Design I CSS Review - In-Class Lab

ICE: HTML, CSS, and Validation

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

CSS for Page Layout. Key Concepts

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

Simply download Beepip from and run the file when it arrives at your computer.

Web Design and Development ACS Chapter 9. Page Structure

Using an external style sheet with Dreamweaver (CS6)

Designing HTML s for Use in the Advanced Editor

CIS 467/602-01: Data Visualization

GUIDE TO CODE KILLER RESPONSIVE S

How to Properly Compose HTML Code : 1

Creating Web Pages with Dreamweaver CS 6 and CSS

Further web design: Cascading Style Sheets Practical workbook

Table of Contents THE DESIGNER S GUIDE TO CREATING NEWZAPP DRAG AND DROP TEMPLATES... 6 THE NEWZAPP SYSTEM... 7

Advanced Editor User s Guide

USD WEB SERVICES ADOBE DREAMWEAVER CSS DEVELOPMENT

JJY s Joomla 1.5 Template Design Tutorial:

Basic tutorial for Dreamweaver CS5

Coding Standards for Web Development

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Create Your own Company s Design Theme

Responsive Web Design: Media Types/Media Queries/Fluid Images

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

Selectors in Action LESSON 3

HTML TIPS FOR DESIGNING

Website Development. 2 Text. 2.1 Fonts. Terry Marris September We see how to format text and separate structure from content.

Cascading Style Sheets (CSS)

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

Campaign Guidelines and Best Practices

Advanced Web Design. Zac Van Note.

Web layout guidelines for daughter sites of Scotland s Environment

Style & Layout in the web: CSS and Bootstrap

Web Design I. Spring 2009 Kevin Cole Gallaudet University

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Base template development guide

Using Adobe Dreamweaver CS4 (10.0)

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Creating a Web Page Using HTML, XHTML, and CSS: The Basics

ART 379 Web Design. HTML, XHTML & CSS: Introduction, 1-2

Web Developer Jr - Newbie Course

HTML and CSS. Elliot Davies. April 10th,

Interactive Data Visualization for the Web Scott Murray

Intro to Web Design. ACM UIUC

Contents. Introduction Downloading the Data Files... 2

Advanced Drupal Features and Techniques

Mobile Web Site Style Guide

Microsoft Expression Web Quickstart Guide

BlueHornet Whitepaper

HTML, CSS, XML, and XSL

MCH Strategic Data Best Practices Review

Learning Web Design. Third Edition. A Beginner's Guide to (X)HTML, Style Sheets, and Web Graphics. Jennifer Niederst Robbins

Tips and tricks with Text boxes in Mahara

How to Display Weather Data on a Web Page

Web Development 1 A4 Project Description Web Architecture

Create Webpages using HTML and CSS

LaGuardia Community College Thomson Ave, Long Island City, New York Created by ISMD s Dept. Training Team. Overview

customer community Getting started Visual Editor Guide!

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Responsive Design

Transcription:

CSS stands for cascading style sheets. Styles define how to display a web page. Styles remove the formatting of a document from the content of the document. There are 3 ways that styles can be applied: Inline The style is applied within the HTML tag. <p style= font-family: verdana; font-size: 12px; ></p> styles are defined using the <style> tag in the head of the document. Embedded The <style> font-family:verdana; font-size:12px; </style> External You can link to a separate style sheet that contains a list of rules to format the content. <link rel= stylesheet type= text/css href= styles.css /> The preferred and perhaps most useful method is using an external style sheet. You can define formatting for anything from text to tables to page layout in one file and use it across multiple pages or your entire site. You can make changes to the site by simply updating the style sheet. Note: You can use different methods in your page. Just remember that inline styles override embedded styles which override external styles. CSS Rules Each CSS rule consists of a selector and one or more declarations. Selector Declaration Declaration h1 {color:blue; font-size: 12px; Property Value Property Value The selector is usually the HTML element that you want to format. Each declaration is made up of a property and a value.

CSS Comments You can add comments to your style to help explain your code. To make certain the comments are ignored by the browser, you must begin them with /* and end them with */. For example: /*Anything between these slashes will not be seen by the browser. Make notes to yourself about your code. CSS Class Selector The class selector can be used to apply multiple looks to an HTML element or apply a particular format to several HTML elements. For example, you may define a general style for the <p> tag, but then need to change that format for a particular paragraph. You can create a class selector for that style. Class selectors must be written with a period: p.bold.bold Both can be used to define a class. The first would be used to format a paragraph; the second would used to format any HTML element. The class would be referenced as class=name. For example: <p class= bold > The class would override the styles for the <p> tag in that one paragraph. Note: You can create multiple selectors for an element, and you can use them more than once in your document or web page. Class ID Selector The id selector is used to set a unique style for an element. It is different from class in that an ID selector should only be used once within a page or document. ID s are most often used in layout. ID selectors are written with # followed by a name for the ID. td#menu td#main td#banner These id selectors could be used to define styles for table cells in the layout table for your web page. The ID selector would be reference as id=name. For example <td id= menu > The ID would apply your unique styles to the table cell. Note: Remember that ID selectors are unique and should only be used once in your document. Just like the class selector, the more specific ID selector will override any general styles.

Styling Hyperlinks (Anchor Tag) One of the elements most often styled by CSS is the anchor (hyperlink) tag. The anchor tag is different from other HTML elements because it has states such as link, visited, hover, and active. The must be listed in the order below in the style sheet. a or a:link a:visited a:hover a:active Use these pseudo-class selectors to style the main hyperlinks (anchors) on your page. There may be a time when you need to have a second anchor style on your page. In that case, you can add a class name to the pseudo-class selectors listed above. a.menu a.menu:visited a.menu:hover a.menu:active Use these pseudo-class selectors to add an second hyperlink style to your page. Example: /*Main Links*/ a { a:visited { a:hover { a:active { text-decoration:underline; /* Menu Links*/ a.menu { a.menu:visited { a.menu:hover{ a.menu:active { text-decoration:underline;

Common Properties Text Properties color sets color of text hex color values or color names color: #000000; color: black; text-align aligns text left, right, center, justify text-align: center; text-decoration adds decoration to text none, underline, overline, linethrough a {text-decoration: none; Font Properties font-family sets the font family of the text any font name or list of names font-family: Verdana, Arial, Helvetica, sans serif; font-size sets the size of the text values in px h3 {font-size: 18px; xx-small to xx-large font-style sets the text style normal, italic, oblique h2 {font-style: italic; font-weight sets the weight (boldness) of the text normal, bold, bolder, lighter multiples of 100 h1 {font-weight: bold; Background Properties background-color sets the color of an hex color values or color names body {background- elements background background-image sets an image as the background image url body {background-image: url ( images/bg.jpg );

Other Properties margin adds space to an area values in px margin: 10px; left, right, top bottom outside the border of an padding left, right, top bottom border left, right, top bottom element adds space around an element inside the border adds/styles border around an element value in px color = hex color values or color names style =solid, dashed, dotted, etc. width=px value padding: 10px; *See notes below When adding a border to an element, it involves setting several values such as color, style, and width. You can declare a style for each value or you can create a shorthand property for borders. In the following example, a border is being adding to the <p> using the normal way and the shorthand. Both add a solid, dark grey border that is 3 pixels wide. border-style: solid; border-color: # 757575; border-width: 3px; Normal Rule border: 3px solid #757575; Shorthand Property When using shorthand, you do not have to include all the values, but you do have to list them in a certain order: border-width border-style border-color