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

Similar documents
Web Design and Development ACS-1809

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

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

CSS: The Basics CISC 282 September 20, 2014

Introduction to WEB PROGRAMMING

CASCADING STYLE SHEETS (CSS) BY: RIHAM ALSMARI, PNU. Lab 4

ITNP43: HTML Lecture 4

INTRODUCTION TO HTML5! CSS Styles!

Web Development & Design Foundations with HTML5, 8 th Edition Instructor Materials Chapter 3 Test Bank

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

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

8a. Cascading Style Sheet

CSS cont. October 5, Unit 4

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

Lesson 5 Introduction to Cascading Style Sheets

Using CSS in Web Site Design

CSS. Location, Inheritance & the Cascade. Copyright DevelopIntelligence LLC

CSS Cascading Style Sheets

CST272 ASP.NET Style Sheets Page 1

FOR MORE PAPERS LOGON TO

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

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

Assignments (4) Assessment as per Schedule (2)

Cascading Style Sheets. Overview and Basic use of CSS

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Figure 1 Properties panel, HTML mode

Html basics Course Outline

Final Exam Study Guide

Chapter 3 Attractive Web Designing

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Three Ways to Use CSS:

Cascading Style Sheets Level 2

Shane Gellerman 10/17/11 LIS488 Assignment 3

How to create and edit a CSS rule

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

Diploma in Mobile App Development Part I

CSS Cascading Style Sheets

Dreamweaver MX 2004 Cascading Style Sheets

Lab Introduction to Cascading Style Sheets

Using Dreamweaver. 6 Styles in Websites. 1. Linked or Imported Stylesheets. 2. Embedded Styles. 3. Inline Styles

HTMLnotesS15.notebook. January 25, 2015

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

3.1 Introduction. 3.2 Levels of Style Sheets. - The CSS1 specification was developed in There are three levels of style sheets

- The CSS1 specification was developed in CSS2 was released in CSS2.1 reflects browser implementations

INTRODUCTION TO CSS. Mohammad Jawad Kadhim

CISC1600-SummerII2012-Raphael-lec3 1

COMS 359: Interactive Media

CHAPTER 4 CASCADING STYLE SHEETS BASICS KEY CONCEPTS

Data Visualization (CIS/DSC 468)

Introduction to Cascading Style Sheet (CSS)

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

Methods for configuring Cascading Style Sheets. Applying style to element name selectors. Style Rule Basics. CMPT 165: Cascading Style Sheets

What is CSS? NAME: INSERT OPENING GRAPHIC HERE:

CSS: formatting webpages

CSS worksheet. JMC 105 Drake University

HTML and CSS: An Introduction

CS134 Web Site Design & Development. Quiz1

CSS: Cascading Style Sheets

Activity 4.1: Creating a new Cascading Style Sheet

Web Design and Application Development

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

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

DAY 4. Coding External Style Sheets

Web Recruitment Module Customisation

Reading 2.2 Cascading Style Sheets

Introduction to HTML and CSS. Arts and Humanities in the Digital Age 2018 CHASE DTP Dr. Paul Gooding

{WebCodeChicks} </spartanburg> Beginning Sass. sass-lang.com/guide

Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

Step 1- Creating a new XHTML Website (2points)

COMS 359: Interactive Media

CSS. Lecture 16 COMPSCI 111/111G SS 2018

Introduction to Web Design CSS Reference

Introduction to Web Design CSS Reference

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

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

Cascading style sheets, HTML, DOM and Javascript

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

Appendix D CSS Properties and Values

Fundamentals of Web Programming a

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

CSC9B1: Essential Skills WWW 1

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

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

Dreamweaver Domain 5: Organizing Content by Using Dreamweaver CS5

To link to an external stylesheet, the link element is placed within the head of the html page:

CSS Lecture 16 COMPSCI 111/111G SS 2018

HTML, XHTML, and CSS 8/21/2011. Chapter Objectives. Chapter 4. Chapter Objectives. Chapter Objectives

Introduction to Web Programming and Design

More about HTML. Digging in a little deeper

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

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

Cascading Style Sheets (CSS) By Example By Steve Callihan

WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5

Block & Inline Elements

Basic CSS Tips and Tricks

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

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

Creating and Building Websites

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

c122jan2714.notebook January 27, 2014

Transcription:

Introduction to CSS Meganadha Reddy K. Technical Trainer NetCom Learning www.netcomlearning.com

Advantages of Style Sheets Saves time Easy to change Keep consistency Give you more control over layout Make it easy to create a common format for all the Web pages

Applying a single style sheet to multiple documents

Basic Structure of a Style Each definition contains: A property A colon A value A semicolon to separate two or more values Can include one or more values h1 {font-size:12pt; color:red}

Style Precedence 1. External style sheet 2. Embedded styles 3. Inline styles

Three Style Types Inline styles Add styles to each tag within the HTML file Use it when you need to format just a single section in a web page Example <h1 style= color:red; font-family: sans-sarif >IU</h1>

Three Style Types Embedded or internal styles A style is applied to the entire HTML file Use it when you need to modify all instances of particular element (e.g., h1) in a web page Example <style> h1 {color:red; font-family:sans-serif} </style>

Creating an Embedded Style <head> <title>embedded Example</title> <style> (default is text/css ) Style declarations </style> </head> A style declaration: Selector {attribute1:value1; attribute2:value2; } Selector = an element in a document (e.g., a header or paragraph)

An Example of an embedded style <head> <title>getting Started</title> <style type= text/css > h1 {font-family: sans-serif; color: orange} </style> </head>

Three Style Types External style sheets An external style sheet is a text file containing the style definition (declaration) Use it when you need to control the style for an entire web site Example h1, h2, h3, h4, h5, h6 {color:red; font-family:sans-serif} Save this in a new document using a.css extension

Creating an External Style Sheet Open a new blank document in Notepad Type style declarations h1 {color:red; font-family:sans-serif;} Do not include <style> tags Save the document as filename.css

Linking to Style Sheets 1 Open an HTML file Between <head> and </head> add <link href=url rel= relation_type type= link_type > URL is the file.css Relation_type= stylesheet Link_type= text/css Save this file and the.css file in the same web server directory

An example of an external style sheet with an original html file <head> <title>getting Started</title> <link href= scraps.css rel= stylesheet type= text/css /> </head> h1 {font-family: sans-serif; color: orange} b {color: blue} html file Text file of css named scraps.css

Style Sheet Strategies Wherever possible, place your styles in external style sheets Take advantage of the power of CSS to have control over an entire Web site

Style Sheet Strategies At the top level of your web site: define a default global.css style sheet Refine styles at sublevels with a section.css style sheet Try to avoid using styles in tags

Attribute Selectors Create an attribute selector to select an element based on the element s attributes.

Using IDs and Classes Use an id to distinguish something, like a paragraph, from the others in a document. For example, to identify a paragraph as head, use the code: <p id= head > </p>

Working With Ids To create an ID for a specific tag, use the property: <tag ID=id_name> To apply a style to a specific ID, use: #id_name {style attributes and values}

Classes HTML and XHTML require each id be unique therefore an id value can only be used once in a document. You can mark a group of elements with a common identifier using the class attribute. <element class= class > </element>

Applying a style to a class

Thank You! Want to learn more about CSS, JavaScript, HTML and more? Check out our Web Development Course Package www.netcomlearning.com info@netcomlearning.com 1-888-563-8266