Web Programming and Design

Slides:



Advertisements
Similar presentations
Introduction to HTML & CSS
Advertisements

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.
Javascript Introduction Norman White Material is from w3schools.com Go there to run examples interactively.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
The Web Warrior Guide to Web Design Technologies
Computer Science 103 Chapter 4 Advanced JavaScript.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Basics of HTML.
Cascading Style Sheet. What is CSS? CSS stands for Cascading Style Sheets. CSS are a series of instruction that specify how markup elements should appear.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Bridges To Computing General Information: This document was created for use in the "Bridges to Computing" project of Brooklyn College. You are invited.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
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.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Lab 3: Language Structures User Interface Lab: GUI Lab Sep. 9 th, 2014.
CO1552 Web Application Development HTML Forms, Events and an introduction to JavaScript.
JavaScript, jQuery, and Mashups Incorporating JavaScript, jQuery, and other Mashups into existing pages.
JavaScript - Basic Concepts Prepared and Presented by Hienvinh Nguyen, Afshin Tiraie.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 8 Scott Marino.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
05 – Java Script (1) Informatics Department Parahyangan Catholic University.
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.
Jaana Holvikivi 1 Introduction to Javascript Jaana Holvikivi Metropolia.
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
JavaScript Defined DOM (Document Object Model) General Syntax Body vs. Head Variables Math & Logic Selection Functions & Events Loops Animation Getting.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Computer Club Content Review Al Huda Computer Club, April 9, 2016 Farid Ahmed.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Week 1: Introduction to HTML and Web Design
Fall 2016 CSULA Saloni Chacha
Introduction to CSS: Selectors
Web Basics: HTML/CSS/JavaScript What are they?
Week 3: Introduction to Javascript
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Week 4: Introduction to Javascript
Concepts of HTML, CSS and Javascript
Introduction to Web programming
Introduction to web design discussing which languages is used for website designing
14 A Brief Look at JavaScript and jQuery.
DHTML Javascript Internet Technology.
Your 1st Programming Assignment
Basic HTML and Embed Codes
DHTML Javascript Internet Technology.
Functions, Regular expressions and Events
Some Stuff You Need to Know
Training & Development
Exercise 9 Skills You create and use styles to create formatting rules that can easily by applied to other pages in the Web site. You can create internal.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
E-commerce Applications Development
Tutorial 10: Programming with javascript
Introduction to Web Application Design
Web Programming and Design
Week 5: Recap and Portfolio Site
Web Programming and Design
Web Programming and Design
Web Programming and Design
Introduction to Web programming
Presentation transcript:

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

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

Web Design Competition There will be a competition for the best designed website!! Theme: “Your Hero” To enter: Simply upload your website into a folder named competition on your Public_html Have your theme picked for next week - bring content with you!

<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

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

Programming Basics With JavaScript

Where to write our JavaScript Just like CSS, we can write our JavaScript code in more than one place. We can write our JavaScript code in our HTML file, as long as it is contained within <script></script> tags We can also write our code into a separate file with a .js file extension and link it to our HTML in the head

Strings: “Hello MPT Class” Data Types In all programming languages, knowing the data type is very important If you know the data type, you will be able to perform the correct “Operation” There are loads of data types! The most common are numbers, strings, booleans, arrays, objects The ones we will look at today are: Numbers: 1, 2, 3, 4.5, 6.2, 9.3 Strings: “Hello MPT Class” Booleans: True, False

var x; x = 1; var a = 4 + 8.5; var b = a - x; Variables You can also declare your variable and assign a value to the variable later on in your code Or your variable can be the value of an expression var x; x = 1; Note: we did not use the word var again. We only need to use var once when declaring a variable Always finish every line with a ; var a = 4 + 8.5; var b = a - x;

Operations Operator Description + Addition - Subtraction * We can perform an operation on these Data Types, just like in arithmetic Operator + - * / % ++ -- Description Addition Subtraction Multiplication Division Modulus Increment Decrement Remainder

JavaScript Events HTML events are "things" that happen to HTML elements. Events can be caused by the user or by the browser. JavaScript can "react" to these events. Event Description onchange An HTML element has been changed onclick The user clicks an HTML element onmouseover The user moves the mouse over an HTML element onmouseout The user moves the mouse away from an HTML element onkeydown The user pushes a keyboard key onload The browser has finished loading the page

function myFunction(argument){ Code goes here…….. } Function Syntax function myFunction(argument){ Code goes here…….. } We have to use the special keyword function Using arguments is optional All code needs to be contained in { }

document.getElementById(“idName”) JavaScript DOM To make these changes we use the Document Object Model This allows us to select HTML tags by their id or class name document.getElementById(“idName”) document.getElementsByClassName(“className”)

JavaScript DOM document.getElementById("myH1").style.color = "red"; We can use the DOM model to change style and change the content within HTML tags We can also add HTML to the inside of HTMl tags document.getElementById("myH1").style.color = "red"; document.getElementById(“myH1”).innerHTML = “New Heading”;

JavaScript for loop syntax To create a for loop we must use the keyword for Then we setup three statements within ( ) before describing the block of code we want to repeat Statement 1 statement 2 statement 3 all separated by ; for (setup var; condition; increase var){ // block of code to repeat } Keyword for

Important Links https://www.w3schools.com/js/js_operators.asp Data types and operators: https://www.w3schools.com/js/js_operators.asp JavaScript DOM https://www.w3schools.com/js/js_htmldom.asp