End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science

Slides:



Advertisements
Similar presentations
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Cascading Style Sheets: Basics I450 Technology Seminar Copyright 2003, Matt Hottell.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS Digital Media: Communication and design 2007.
Today CSS HTML A project.
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
CSS. CSS, or Cascading Styles Sheets, is a way to style HTML. Whereas the HTML is the content, the style sheet is the presentation of that document.
Very quick intro HTML and CSS. Sample html A Web Title.
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease
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.
Links.  Styling Links  Links can be styled with any CSS property (e.g. color, font-family, background-color).  Special for links are that they can.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
CSS cont. October 5, Unit 4. Padding We can add borders around the elements of our pages To increase the space between the content and the border, use.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
Cascading Style Sheets Based on Castro, HTML for the WWW, 6 th edition Ron Gerton, Fall 2007.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
1 Dreamweaver CS5 intermediate class by Cookie Setton Build a CSS website WITHOUT TABLES Just when you thought you were starting to understand HTML coding,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Diliev.com & pLOVEdiv.com  DIliev.com.
Cascade Style Sheet Demo. Cascading Style Sheets Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to.
กระบวนวิชา 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.
Class four: the box model and positioning. is an HTML tag which allows you to create an element out of inline text. It doesn’t mean anything! try it:
Unit 20 - Client Side Customisation of Web Pages
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
CSS Cascading Style Sheets Brief Introduction
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
More CSS CS HTML id attribute 2 Coding Horror! Our mission is to combine programming and “human” factors with geekiness! output  A unique ID for.
4.01 Cascading Style Sheets
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Chapter 12 Cascading Style Sheets: Part II The Web Warrior Guide to Web Design Technologies.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
More Basic HTML. Add spacing (single & double space) Save Refresh Add horizontal rule Add comments Add styles Add headings Add features Add alignments.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
End User Computing More on HTML and CSS Sujana Jyothi Department of Computer Science
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
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.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
CSS Cascading Style Sheets *referenced from
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
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.
WebD Introduction to CSS By Manik Rastogi.
Create a new stylesheet called Hotel Style
The Box Model in CSS Web Design – Sec 4-8
4.01 Cascading Style Sheets
( Cascading style sheet )
Creating Your Own Webpage
CSS Rule Selector Declaration Block Value Attribute Name body {
>> Introduction to CSS
Cascading Style Sheets (Layout)
The Box Model in CSS Web Design – Sec 4-8
Cascading Style Sheets
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Cascading Style Sheets Color and Font Properties
Training & Development
CSS Styles Fonts and Colors.
4.01 Cascading Style Sheets
Cascading Style Sheets
Presentation transcript:

End User Computing An Introduction to CSS Sujana Jyothi Research Lab1, Callan Building, Department of Computer Science

Recap Slides from previous lecture are available at: Today we will… i.Use what we did on Monday to develop a webpage ii.Begin using CSS End User Computing

Exercise 1… Create a webpage for this End User Computing module The webpage must contain Lecture Material, and Contact Details, plus links to relevant websites. You have 20 minutes to do this End User Computing

HTML = Structure The page should contain the following: a title an introduction course details contact details and a list of links HTML allows us to build this structure and we can give it a style later End User Computing

HTML tags to use You’ll need to use the tags talked about in Monday’s lecture e.g.: Title: … Header tags: … Lists: …, …, … Paragraphs: … Hyperlinks: …. End User Computing

Webpage Template End User Computing So we've created the page but it’s pretty dull!

Styling the page End User Computing We can style the page to improve its appearance

Styling webpages End User Computing Use Cascading Stylesheets (CSS) Specify the style of any HTML element CSS is quite easy to read and understand

Example 1: Background and font colour End User Computing The body tags contain the information displayed in the browser window Lets say you want to change the background to blue and the font colour to white… In a CSS file we can choose the element we want to style, body, and give it’s attributes, background and color a new value: body { background:blue; (or #150E79 ;) color: white; font-family: Helvetica, Verdana, Arial,sans-serif; } Element we're styling Attributes we're changing Set the attributes new values

Linking to a CSS file End User Computing All the CSS code should go into a file, which is usually called style.css. You need to add a tag to your HTML with an attribute that will tell the HTML you are using a style file This should be put inside the head tags in the HTML......

Example 2: Header tag End User Computing Lets try changing the header 1 tag to have a background that is black text colour that is dark blue font that is 16px Helvetica h1 { background:black; color:#007; font:16px Helvetica; } Hexadecimal Colour Range

Colours End User Computing Hexadecimal numbers have a range of 16. They run from 0-9,A-F. Colours in CSS can be defined using a colour name (red), an rgb value (rgb(255,0,0)) or a hex number (#ff0000)‏ With a hex number or rgb value the first two digits relate to red, the third and fourth relate to green and the last two relate to blue, i.e: dark red = #ff0000 dark green = #00ff00 dark blue = #0000ff white = #ffffff black= # A link to help you choose colours is on the course page.

Example 3: Header 2 tag End User Computing Lets try changing the text to be centred give it a border h2 { text-align:center; border:5px solid black; }

Example 4: Hyperlinks End User Computing Hyperlinks have many properties, such as if you have visited the link, if you are hovering over the link with a mouse. Lets change the links to a yellow colour remove the underline to a blue colour if you hover over it a { color:#FFFB1F; text-decoration:none; } a:hover { color:#1424FF; } On hover what would you add to get back the underline ?????

Styling the module page End User Computing Now we're going to go through, step by step how to style the new course page. Notice to style a page you change the CSS file not the html file

Example 5 body { color:white; background: #150E79; font-family: Helvetica, Verdana, Arial,sans-serif; line-height: 150%; /* space out the text by changing the lineheight center the text and encapsulate the text by forcing it to stay within 80% of the browser window put a border around the whole body */ font-size: 100%; width:80%; border:1px solid white; /* centre the body section by using the "auto" value we are stating that the left and right margin should be as large as they can */ margin-left:auto; margin-right: auto; } End User Computing

Exercise 2.. End User Computing 1. Style the header 1 tag by centring it – (text-align: ) giving it a border at the bottom – (border-bottom: ) and padding it at the top and the bottom – (padding-bottom: padding-top: ) 2. Create a box around the unordered list set it to be 80% of the allowed width (thats 80% of the body section) give it a greeny background and a redish border border:1px solid #FF80AD; background:#005D72; width:?

Exercise 3.. End User Computing Now for the rest of the lab you will be creating your own webpage. What you are to do is create your own styled webpage based around your favourite celebrity. First off gather your information, this should include A list of their fullname, date of birth, nationality and any else relevant. A picture if possible Links to websites about them or information about them. Then structure it with HTML Then style it with CSS.

Guidelines End User Computing It is always a good idea to indent your HTML and CSS, this means lining up all the start and end tags. If you use HTML you found elsewhere it will be obvious, you will need this lab to be able to do the assignment. Two handy pages you'll need are: