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.

Slides:



Advertisements
Similar presentations
CSS-Formatting Review Cascading Style Sheets addstyle to your HTML web pages.
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
CSS The basics { }. CSS Cascading Style Sheets - language used to – describe html appearance & formatting Style Sheet - file that describes – how html.
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.
CHAPTER 7 STYLING CONTENT WITH CASCADING STYLE SHEETS.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
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.
Introduction to CSS.
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.
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.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
Cascading Style Sheet (CSS) Instructor: Dr. Fang (Daisy) Tang
Computing Concepts: CSS. Aims  To understand the uses of css  To understand the different types of css  To be able to create a css file  To be able.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
XHTML and CSS Introduction to XHTML and CSS Bharti Patel 1 phones off (please)
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.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Cascading style sheets (CSS)
Cascading Style Sheets (CSS) 1.  What is CSS?  Why CSS?  How to write a CSS? 2.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
I NTRO TO CSS IAT100 Spring I NTRO TO CSS Covered in this lesson: Overview What is CSS? Why to use CSS? CSS for Skinning your Website Structure.
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.
JMD2144 – Lesson 4 Web Design & New Media.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
XHTML/CSS Week 3. This Week  Quiz to revise last week (XHTML and DW)  CSS - Part 2  Using HTML Tables.
CO1552 – Web Application Development Cascading Style Sheets.
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.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
IS 360 Declaring CSS Styles. Slide 2 Introduction Learn about the three ways to declare a style Inline / embedded / external Learn about the effect of.
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.
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 (CSS). A style sheet is a document which describes the presentation semantics of a document written in a mark-up language such.
XHTML Formatting font with a style declaration. Formatting Font HTML uses the font tag to change size and family of font But… the font tag is being deprecated.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Cascading Style Sheets I Embedded Style Sheets. Page Design ICSS 2Instructor: Sean Griffin What is a Style Sheet? A style sheet is a text file that contains.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
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 Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
CSS Cascading Style Sheets *referenced from
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
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.
CSS DHS Web Design. Location Between the & Start with – End with –
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 Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
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.
>> Introduction to CSS
Introduction to CSS.
IS 360 Declaring CSS Styles
Cascading Style Sheets (CSS)
Intro to CSS CS 1150 Fall 2016.
Introduction to CSS.
Intro to CSS CS 1150 Spring 2017.
Software Engineering for Internet Applications
Introduction to Cascading Style Sheets (CSS)
What are Cascading Stylesheets (CSS)?
Training & Development
CSS Styles Introduction.
HTML &CSS and Make a website with coding
Presentation transcript:

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 you to divide your page into containers (that is, different pieces) It will come in handy when we learn CSS

Try this Build a skeleton html Run it and what do you see? Add another ‘box’ of yellow color under the green

Link it The smart use of will eventually allow you to create visual HTML objects like sidebars, menus, and more! Just like images, you can make clickable by wrapping them in.. tags

“span”tastic! While allows you to divide your webpage up into pieces you can style individually, allows you to control styling for smaller parts of your page, such as text If you want the first word of your paragraph to be red, you wrap each word in.. tags and make them red using CSS!

An example of span This text is black, except this is green and this is red !

is the man! is the man! These tags can be a little tricky, so let’s go through one more time Color is just one attribute you can selectively change with tags; you can also change font size, font family, and any other style attribute you can think of! My favorite font is > Impact !

Observe this code My Photo Page

Explanation In the code, there is stylesheet.css, an external file This file include a lot of ‘codes’ to beautify or format the look of the webpage

Cell by cell If you need to create a photo page of yours, maybe you will need nine cells (3x3) – 3 rows by 3 columns My Photo … Add 2 more rows, each rows with three columns

Nine pictures are worth 9,000 words Find nine pictures ◦ It can be saved from an internet or image links or your own stock In each cell, put it an image Create a link to each image

Seeing is believing Everything written in HTML “as it is” results in pretty ugly The stylesheet.css tab contains all the CSS styling information: where HTML elements should go, what color they should be, how big they should be, and more

If you’re on the internet, go to elearning and download web05.html file Run the file and observe the outlook In the coding, remove the tags (the comments) Run it again What is your comment?

What is CSS? Stands for Cascading Style Sheets A language used to describe the appearance and formatting of your HTML A style sheet is a file that describes how an HTML file should look like The style sheets are cascading because the sheets can apply formatting when more than one style applies It means that, if you say all paragraphs should have blue font, and only one paragraph should have red font, it can be done

Where can you write CSS? CSS within HTML can be written three ways: ◦ embedded ◦ internal ◦ external embedded is when the CSS is written line by line internal is having the.. tag within the tag which has all the CSS codes in it external is having all the CSS code outside of the HTML file and having it called from inside the tag When you write external CSS file, you need to save it as.css

Why separate form from function? Two main reasons for separating your form/formatting (CSS) from your functional content/structure (HTML) ◦ You can apply the same formatting to several HTML elements without rewriting code (e.g. style=“color:red;” over and over ◦ You can apply similar appearance and formatting to several HTML pages from a single CSS file

You don’t believe me? Download “web05_css1.html” and “stylesheet.css” from elearning Run web05_css1.html Open up stylesheet.css so that you can modify the code ◦ add font-family:cursive; in the span element Run web05_css1.html again What difference do you observe?

Syntax to write CSS HTML element (Selector) { property: value; } E.g. p { color: blue; font-family: Arial; font-size: 20px; } In this case, all paragraphs in your HTML file will be Arial, 20px size and in blue color

Embedded CSS p { color:purple; {

So you have all three types in HTML The priority is given to internal (inline) styling Next will be embedded Finally, the external CSS will be taken into account

External CSS: how to call it in your HTML file Put a tag between the tags In the tab, a type attribute should be always be equal to “text/css” A rel attribute should always be equal to “stylesheet” A href attribute should point to the web address of your CSS file

One selector, many properties Another cool advantage of CSS is that you can set many properties for one selector If you want to set a paragraph’s font, font color, and font size, you can simply write p { font-family: Arial; color: green; font-size: 20px; }

Try for size Create a CSS to make paragraph font color as green, font as Garamond and font size to 24 pixel

Many selectors, many properties Create a CSS external file with these properties, save it as stylesheet.css ◦ Make all the h3 headings red ◦ Set all the paragraphs to the Courier font family ◦ The second paragraph contains text between.. tags. Set the background color of that to yellow The HTML file can be downloaded from elearning website (web_css02.html)

Why is the semicolon important? It is important to remember to put a semicolon (;) at the end of each line The semicolon tells CSS that one property-value pair is over and it’s time to move on to the next one Without semicolons, it’ll become confused and your page won’t look right Also, don’t forget: all property-value pairs for selector are surrounded by curly braces ( { } )

What is wrong with this CSS syntax? h3 { font-family: Verdana color: blue ) p [ font-family: Garamond font-size: 16px {

Comments While it is important to get all your syntax down correctly, it is also a good idea to write comments as you go along Good comments will help remind you why you did something a certain way (or will help someone else out if they are reading your code) HTML comments look like this: ◦ A comment in CSS looks like this: ◦ /* a comment in CSS */

Make changes to this code Result Change me to Verdana. Change me to Courier. Make me purple!

Instructions Add a to stylesheet.css between your.. tags Change the header’s font-family to Verdana Change the header’s font-family to Courier Make the paragraph text color to purple Add a comment to the CSS to comment on anything you like