Web Programming and Design

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.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
Ideas to Layout Beginning web layout using Cascading Style Sheets (CSS). Basic ideas, practices, tools and resources for designing a tableless web site.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
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.
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.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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.
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.
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 Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
4.01 Cascading Style Sheets
CM143 Week 4 Introducing CSS. Cascading Style Sheets A definition for the style in which an element of the webpage will be displayed Border width, colour,
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.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Cascading style sheets (CSS)
The Characteristics of CSS
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
Styling and theming Build campaigns in style. What we'll look at... How a web document is structured How HTML and CSS fit together Tools you will need.
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.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
CSS Cascading Style Sheets *referenced from
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
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.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
WebD Introduction to CSS By Manik Rastogi.
Fall 2016 CSULA Saloni Chacha
CSS.
Working with Cascading Style Sheets
Cascading Style Sheet.
Web Basics: HTML/CSS/JavaScript What are they?
Getting Started with CSS
CS3220 Web and Internet Programming CSS Basics
4.01 Cascading Style Sheets
( Cascading style sheet )
Week 2: Introduction to Design and CSS
>> Introduction to CSS
>> The “Box” Model
Cascading Style Sheets
Introduction to Web programming
Cascading Style Sheets (Layout)
Web Systems & Technologies
Introduction to web design discussing which languages is used for website designing
Cascading Style Sheets
CASCADING STYLE SHEET CSS.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Website Design 3
CSS Borders and Margins.
Second CSS Lecture Applications to XML
DynamicHTML Cascading Style Sheet Internet Technology.
What are Cascading Stylesheets (CSS)?
DynamicHTML Cascading Style Sheet Internet Technology.
CS3220 Web and Internet Programming CSS Basics
Cascading Style Sheets
4.01 Cascading Style Sheets
Web Client Side Technologies Raneem Qaddoura
Web Programming and Design
Introduction to Cascading Style Sheets (CSS)
Web Programming and Design
Web Programming and Design
Web Programming and Design
CGS 3066: Web Programming and Design Fall 2019
Presentation transcript:

Web Programming and Design MPT Senior Cycle Tutor: Tamara Week 2

Plan for the next 4 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style Introduction to JavaScript More advanced JavaScript Portfolio Site

<tagname>Some Content in here….</tagname> HTML Reminder HTML stands for Hyper Text Markup Language HTML allows us to describe and define the structure of our website using markup All the elements in a web page are represented in tags <tag> Example of HTML elements include: headings, paragraphs, images, videos Nearly all HTML tags come in pairs with an start and end tag <tag> </tag> The Browser will not display these tags, instead it will use the tags to render the web page <tagname>Some Content in here….</tagname> Defines the type of element The stuff that gets displayed Close off the element

CSS

Where to write our CSS? <div style=”color: blue; ”></div> 3 Places the Style can go We can write all our CSS in an external CSS file and link it to our HTML document We can write our CSS within <style> tags in the <head> tag of our HTML document We can write our CSS inline. That is within the HTML tags: <div style=”color: blue; ”></div>

h1 {color: blue;} What is CSS? Selector (HTML tag) Property Value CSS stands for Cascading Style Sheets CSS describes how HTML elements are to be displayed on screen It allows us to change the style or appearance of our web page CSS contains a selector and property, value pair The selector is the HTML tag you would like to style h1 {color: blue;} In this example, all the h1 tags in the HTML document will be changed to blue Selector (HTML tag) Property Value

h1 {color: blue; text-align: center;} CSS Syntax The declaration block is contained within { } there can be multiple declarations within these { } A declaration must include a style property and a value, they are separated by : A CSS declaration always ends with a ; Declaration Declaration h1 {color: blue; text-align: center;} Selector (HTML tag) Property Value Property Value

h1 {color: blue;} CSS Syntax In the below example all text within h1 (heading) tags will be displayed in the browser in blue But what if we did not want to change all the h1 elements? Perhaps we only wanted to change one h1 tag to display blue To write a comment in CSS we use /* comment written here */ h1 {color: blue;}

<h1 id=”myH1” >My Heading</h1> CSS Syntax To change a specific HTML tag, we can give that tag a unique ID All HTML ID’s must be unique (they cannot have the same name!) They must start with a lowercase letter, they cannot start with a number Then we can call the ID as a selector in our CSS We must add a # before the selector so that CSS knows to look for an ID in our HTML document <h1 id=”myH1” >My Heading</h1> #myH1 {color: blue;}

<h1 class=”blueText” >My Heading</h1> CSS Syntax We can also change a group of HTMl elements by giving the same class Unlike ID, multiple HTML tags can have the same class A class name must start with a lowercase letter and cannot start with a number We must add a . before the class name in CSS, so that CSS knows to look for HTML tags with this class <h1 class=”blueText” >My Heading</h1> <p class=”blueText” >My Paragraph</p> .blueText {color: blue;}

CSS: Padding, margin, border

CSS Borders The CSS border properties allow you to specify the style, width, and color of an element's border

CSS Margins The CSS margin properties are used to create space around elements, outside of any defined borders. CSS has properties for specifying the margin for each side of an element: Margin-top Margin-right Margin-bottom margin-left All the margin properties can have the following values: auto - the browser calculates the margin length - specifies a margin in px, pt, cm, etc. % - specifies a margin in % of the width of the containing element inherit - specifies that the margin should be inherited from the parent element

CSS Padding The CSS padding properties are used to generate space around an element's content, inside of any defined borders. CSS has properties for specifying the padding for each side of an element: Padding-top Padding-right Padding-bottom padding-left All the padding properties can have the following values: length - specifies a padding in px, pt, cm, etc. % - specifies a padding in % of the width of the containing element inherit - specifies that the padding should be inherited from the parent element

CSS: Colour

CSS Colour Colors in CSS are most often specified by: A valid color name - like "red" An RGB value - like "rgb(255, 0, 0)" A HEX value - like "#ff0000" rgb(red 0-255, green 0-255, blue 0-255) #r8r1g8g1b8b1 - e.g. “#00ff00” is just green Hex uses 0-9 and a-f You can find a list of supported colour names at: https://www.w3schools.com/colors/colors_name s.asp And colour pickers at: W3schools Colour Picker: http://www.w3schools.com/colors/colors_picker. asp Palleton: http://paletton.com/

CSS: Animations

CSS Animations An animation lets an element gradually change from one style to another. You can change as many CSS properties you want, as many times you want. To use CSS3 animation, you must first specify some keyframes for the animation. Keyframes hold what styles the element will have at certain times.

CSS @keyframes Animations When you specify CSS styles inside the @keyframes rule, the animation will gradually change from the current style to the new style at certain times. To get an animation to work, you must bind the animation to an element. You must also set a duration in seconds. Otherwise we won’t see the animation

CSS @keyframes Animations The following example binds the "example" animation to the <div> element. The animation will last for 4 seconds, and it will gradually change the background-color of the <div> element from "red" to "yellow"

Important Links https://www.w3schools.com/colors/colors_names.asp http://www.w3schools.com/colors/colors_picker. asp http://paletton.com/