CSE CASCADING STYLE SHEETS CSS Faculty of Computer Science and Engineering.

Slides:



Advertisements
Similar presentations
Web Engineering 1 Ishaq Khan Shinwari MCS City University Peshawar.
Advertisements

Today CSS HTML A project.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
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.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
กระบวนวิชา 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.
Stylin’ with CSS. 2 Topics What is CSS? Why CSS? CSS Examples.
CS4370/6370 Web Development Cascading Style Sheets (CSS)
CASCADING STYLE SHEETS CSS. 2 What CSS means?  CSS is an extension to basic HTML that allows you to style your web pages.  It separates the part that.
Cascading Style Sheets SP.772 May 6, CSS Useful for creating one unified look for an entire web site. Helps to seperate style from content. Can.
Web Design & Development Cascading Style Sheets (CSS)
1 Cascading Style Sheets C S S. 2 What is CSS? A simple mechanism for controlling the style of a Web document without compromising its structure. It allows.
4.01 Cascading Style Sheets
Cascading style sheets - CSS
Lecture CSS: Cascading Style Sheets. What are Styles? Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics.
FINAL EXAM REVIEW WEB TECH. JUST CLICK… THE CORRECT ANSWER WILL APPEAR WHEN YOU CLICK. GOOD LUCK!
Selectors thru Borders. CSS – Cascading Style Sheets – is a way to style HTML HTML is the content base of a web page CSS provides the presentation qualities.
CSS1-1 Cascading Style Sheets (CSS) Xingquan (Hill) Zhu
HIGHER COMPUTING CSS. WHAT IS CSS? CSS: Cascaded Style Sheets used to separate a web site’s content(information) from its style(how it looks).
Cascading Style Sheets Example
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
CSS Dvijesh Bhatt.
HTML - Quiz #2 Attendance CODE:
Cascading style sheets (CSS)
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
CSS Cascading Style Sheets By Garrett Garman. CSS Why use Style Sheets? Separates Appearance and Structure Modularity Quick and Easy changes Flexibility.
1Computer Sciences Department. And use
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Cascading Style Sheets, pt 2 ECA 225 Applied Online Programming.
XP New Perspectives on XML Tutorial 5 1 TUTORIAL 5 CSS Tutorial – Carey ISBN
 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.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorials 3 & 4: Working With CSS.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
Tutorial #3 Cascading Style Sheets. Tutorial #2 Review - Anchors Links to Site DMACC Internal Links Go to Top Mail To me Local.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
MySQL and PHP Review CSS. Cascading Style Sheet (CSS) Style sheets are files or forms that describe the layout and appearance of a document. Cascading.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
HTML - Quiz #2 Attendance CODE:
Lesson 03 // Cascading Style Sheets. CSS Stands for Cascading Style Sheets. We’ll be using a combination of Html and CSS to create websites. CSS is a.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Cascading Style Sheets Robin Burke ECT 270. Outline Midterm The Layout Debate CSS properties Fonts Alignment Color CSS selection selectors pseudo-classes.
Creating Your Own Webpage COSC Cascading Stylesheets Think of: HTML: content of your webpage HTML has tags CSS: presentation and appearance of your.
CSS with XHTML Please use speaker notes for additional information!
3. Cascading Style Sheets (CSS) M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer.
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.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
Copyright © 2006, Jumail, FSKSM, UTM Slide 1 Cascading Style Sheets (CSS)
©SoftMoore ConsultingSlide 1 Introduction to HTML: Cascading Style Sheets.
CSS – Cascading Style Sheets
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
CSS properties Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
CSS: Cascading Style Sheets Part II. Style Syntax.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
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.
Creating Layouts with CSS. Span tag Here is some underlined text. Here is some blinking text. Here's some bold text.
ECA 228 Internet/Intranet Design I Cascading Style Sheets.
Tutorial 3 Designing a Web Page with CSS
Chapter 11 & 12 CSS Style Sheets: Intro. Why CSS? Separate presentation from content – more accessible Less work – can change appearance of whole site.
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML & CSS Contents: the different ways we can use to apply CSS to The HTML documents CSS Colors and Background CSS Fonts CSS Text CSS box model: padding,
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.
( Cascading style sheet )
Creating Your Own Webpage
Presentation transcript:

CSE CASCADING STYLE SHEETS CSS Faculty of Computer Science and Engineering

CSE INTRODUCTION  Cascading Style Sheets enable you to control the style and layout of a web page. They will enable you to specify link styles, fonts, margins, tables, colors, sizes, alignments and much more throughout your entire web page.  They can also be used to create a template like style sheet (stored within a separate file) that can be used throughout your web site. You can simply link to your style sheet within each of your web pages and have the ability to update the styles for your entire web site with just one file.

CSE INTRODUCTION  The Benefits of Using Cascading Style Sheets  CSS will save you a great deal of time.  You can make changes to the CSS file, they will automatically update all of the pages on your web site.

CSE CREATING CSS  Inline CSS [Inline style]:  Added to your standard HTML tags.  Embedded CSS [Internal style]:  An embedded CSS is exactly as it sounds. The CSS code is actually placed within the HTML web page between the and tags.  Linked CSS [External style]:  A linked style sheet, on the other hand, is a completely separate document that is linked to within a web page.

CSE CREATING CSS  Inline CSS: used within HTML tag using the STYLE property. Content

CSE CREATING CSS  Ex: Tuoi tre {remove the underline of individual link}

CSE CREATING CSS  Embedded CSS:  Performs the same tasks as the inline style tags. However, the coding is placed between the and tags within your HTML page. You can specify how your entire page will appear including links, fonts, text and more, simply by using embedded style tags.

CSE CREATING CSS tagName {property1: value 1; property2: value 2 …}  Exp: Body{background-color:#ff0000;}

CSE CREATING CSS H1,H2 { color: #8B008B ; font-family: Arial } body {background-color: #ADFF2F;} This is the H1 element This is the H2 element This is the H3 element with its default style as displayed in the browser

CSE CREATING CSS  Linked CSS: creating a file that defines specific styles. This CSS file can be used throughout your entire web site to specify everything from body styles and headings to paragraphs and HTML tables.  Creating a Linked CSS:  Create a file in Notepad with all of attributes which want to format  Save this file with extension.css

CSE CREATING CSS  Style.css file Body{font-family: Arial; font-size:12px} H1{font-family:Georgia; font-size:16px; font-weight: bold; color: blue} P{font-weight: normal; color:blue}

CSE CREATING CSS  Apply.css file for HTML pages.  Place a link to your style.css file within HTML page between and tags  Syntax:<Head> </Head>

CSE CREATING CSS  Example:

CSE Apply a style for many HTML pages

CSE Apply a lot of style sheets for a HTML page

CSE CSS Classes and ID's  Classes and ID's are used much the same way in CSS.  Classes are often used to identify groups of selectors, while ID's are used to identify one selector or element.  Class is used for plain HTML documents, while ID's are usually used for documents that contain JavaScript or Dynamic HTML (DHTML).

CSE CSS Classes and ID's  A class is created, as explained above, with the use of a period and a codeword for the class.  A ID is specify “#” symbol  An class is specified in “.” symbol.  Classes or ID's can be used a lot of HTML tags such as, and and many others.  Define tables by using classes and ID's in CSS.

CSE Style.css

CSE CSS Classes and ID's

CSE CSS Classes and ID's

CSE CSS Classes and ID's

CSE Styles for Colors and backgrounds  color : [value of color]  background-color : [value of color]  background-image : url([ file name])  background-repeat : [types for repeat]

CSE Styles for Colors and backgrounds  background-position:[value of points]

CSE Styles for Colors and backgrounds  background

CSE Style for Font  font-family :[ arial, verdana, sans-serif]; {tên font}  font-style : [italic, normal, oblique ]  font-variant : [normal, small-caps]  font-weight : [normal, bold]  font-size : [?pt, ?em,?%, ?px]  font [font-style | font-variant | font-weight | font- size | font-family] :

CSE Style for Text  text-indent:[khoảng cách text (px)]  text-align:[left,right,center,justify(canh lề)]  text-decoration:[underline,overline,line-through]  letter-spacing :[px]  text-transform :[capitalize, uppercase, lowercase, none]

CSE Style for Links  States of hyperlinks  a:link  a:visited  a:active  a:hover A:link {text-decoration: none} A:visited {text-decoration: none} A:active {text-decoration: none} A:hover {font-size:24; font-weight:bold; color: red;}

CSE Styles for bullets  Styles for bullets: List-style:circle chấm tròn rổngList-style:circle chấm tròn rổng List-style: disc chấm tròn đen List-style: square chấm đen vuông List-style: decimal đánh số ả rập List-style: lower-alpha thứ tự alpha List-style: upper-alpha thứ tự alpha chữ in hoa List-style: upper-roman số la mã hoa List-style: lower-roman số la mã thường list-style-image: url (images/bullet.gif)}

CSE Styles for Margin and Padding  Styles Margin and Padding: The margin clears an area around an element (outside the border). It includes top, right, bottom, and left margin which can be changed independently using separate properties.

CSE Styles for Margin and Padding  The padding clears an area around the content (inside the border) of an element. It includes top, right, bottom, and left margin which can be changed independently using separate properties.

CSE Styles for Border  border-width : [value];  border-color : [value of color]

CSE Styles for Border  border-style :[value]  border :[width style color ]

CSE Styles for position of elements: Ex: h1 { border-width: thick; border-style: dotted; border-color: gold; } h2 { border-width: 20px; border-style: outset; border-color: red; } p { border-width: 1px; border-style: dashed; border-color: blue; } ul { border-width: thin; border-style: solid; border-color: orange; }

CSE Styles for position of elements  position:[absolute,relative];  top: [value];  left: [value];  bottom: [value];  right: [value];

CSE Styles for position of elements #box1 { position:absolute; top: 50px; left: 50px; } #box2 { position:absolute; top: 50px; right: 50px; } #box3 { position:absolute; bottom:50px; right: 50px; } #box4 { position:absolute; bottom:50px;left:50px; }

CSE Styles for position of elements

CSE Color Table of HTML and CSS  The principle of color:  Any color is combined by three main color: red, green and blue.

CSE Color Table of HTML and CSS  Use hex #rrggbb  rr: red  gg : green  bb : blue  White RGB=(255,255,255)=#FFFFFF  Black RGB=(0,0,0)=#  Yellow RGB=(255,255,0)= #FFFF00  Red RGB=(255,0,0)=#FF0000  Blue RGB=(0,0,255)=#0000FF

CSE Color Table of HTML and CSS