Intro to HTML5 IDIA 619 Spring 2013 Bridget M. Blodgett.

Slides:



Advertisements
Similar presentations
1/7 ITApplications XML Module Session 8: Introduction to Programming with XML.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
Lesson 12- Unit L Programming Web Pages with JavaScript.
 A markup language  Structures content on the internet  Commonly used by web browsers.
HTML 5. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML came in The web has changed.
HTML 5 Tutorial Chapter 1 Introduction. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Tutorial 10 Programming with JavaScript
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
Lecture 18. HTML5 and JavaScript Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring the Internet,
Python and Web Programming
CS 299 – Web Programming and Design Overview of JavaScript and DOM Instructor: Dr. Fang (Daisy) Tang.
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
CS 415 N-Tier Application Development By Umair Ashraf July 16,2013 National University of Computer and Emerging Sciences Lecture # 12 HTML/ XHTML/ HTML5.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Review HTML5.
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
4.1 JavaScript Introduction
Copyright © Curt Hill PhP History and Introduction.
Lesson 4: Using HTML5 Markup.  The distinguishing characteristics of HTML5 syntax  The new HTML5 sectioning elements  Adding support for HTML5 elements.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
CS 215 Web Oriented Programming Review Dr. Orland Hoeber orland
Review IDIA 619 Spring 2013 Bridget M. Blodgett. HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user.
Javascript. Outline Introduction Fundamental of JavaScript Javascript events management DOM and Dynamic HTML (DHTML)
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
1 JavaScript in Context. Server-Side Programming.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Tutorial 10 Programming with JavaScript. XP Objectives Learn the history of JavaScript Create a script element Understand basic JavaScript syntax Write.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 5 INTRODUCTION JAVASCRIPT G H E F.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
Date : 3/3/2010 Web Technology Solutions Class: Application Syndication: Parse and Publish RSS & XML Data.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Scripting with the DOM Ellen Pearlman Eileen Mullin Programming the Web.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
ALBERT WAVERING BOBBY SENG. Week 4: JavaScript  Quiz  Announcements/questions.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
1 JavaScript
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
JavaScript is an object-based scripting language that is lightweight and cross-platform. 3-Feb-16 JavaScript.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 9.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Introduction to Javascript. What is javascript?  The most popular web scripting language in the world  Used to produce rich thin client web applications.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
CGS 3066: Web Programming and Design Spring 2016 Introduction to JavaScript.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
HTML 5 Tutorial Chapter 1 Introduction.
Introduction to Internet Programming
Introduction to JavaScript
JavaScript an introduction.
DHTML Javascript Internet Technology.
Exercises on JavaScript & Revision
DHTML Javascript Internet Technology.
Introduction to Programming the WWW I
T. Jumana Abu Shmais – AOU - Riyadh
Introduction to JavaScript
JavaScript CS 4640 Programming Languages for Web Applications
Week 5: Recap and Portfolio Site
Web Programming and Design
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

Intro to HTML5 IDIA 619 Spring 2013 Bridget M. Blodgett

Topics Getting to know HTML5 Using F12 + Learning From Code Combining HTML5 and JavaScript Pseudocode and project planning

An Evolution Created ~1990 HTML went through a series of rapid transformations during the early to mid decade – Finally found a home with the creation of a standards group W3C HTML3 (later updated to 3.2)was completed in 1997 and is the format many people are familiar with HTML4 was produced the same year but was seen as a dead-end with the introduction of XHTML

An Evolution In 1998 HTML (not XHTML) was declared dead although some groups did continue working on the DOM Level specifications In 2003 progress on replacing HTML with another technology (XML) were ceased when it became apparent that XML was more suited to newer tech than replacing old tech (e.g RSS) The initial principles for HTML5 began developing during 2005

An Evolution Private Industry decided to pursue working on the HTML standard and created the WHATWG site WHATWG was based on several core principles: – technologies need to be backwards compatible – specifications and implementations need to match even if this means changing the specification rather than the implementations – specifications need to be detailed enough that implementations can achieve complete interoperability without reverse-engineering each other

An Evolution The latter requirement in particular required that the scope of the HTML5 specification include what had previously been specified in three separate documents: HTML4, XHTML1, and DOM2 HTML W3C joined the group and then split off again over differences of how the standard should be updated – They borrow and release a more fixed version that only updates for bug fixes

HTML vs XHTML The main difference today is in the MIME type declaration – Declaring a document text/html and application/xhtml+xml results in slightly different parsing by the web browser with xml being stricter in its application

HTML A basic HTML document looks like this: Sample page Sample page This is a simple sample. HTML user agents (e.g. Web browsers) then parse this markup, turning it into a DOM (Document Object Model) tree. – A DOM tree is an in-memory representation of a document.

DOM

This DOM tree can be manipulated from scripts in the page Result: document.forms.ma in.elements.resul t.value = 'Hello World'; Each element in the DOM tree is represented by an object, and these objects have APIs so that they can be manipulated var a = document.links[0]; // obtain the first link in the documentdocumentlinks a.href = 'sample.html'; // change the destination URL of the linkhref a.protocol = 'https'; // change just the scheme part of the URLprotocol a.setAttribute('href', ' // change the content attribute directly

Presentaion in HTML5 The majority of presentational features from previous versions of HTML are no longer allowed: – The use of presentational elements leads to poorer accessibility – Higher cost of maintenance – Larger document sizes These items are no longer supported at all and should not be used with HTML5 – Except for which is situational

Updating to HTML5 The structure of pages has changed slightly: – Doctypes can now be written simply as – Charactersets are – Stylesheet links: – Scripts: Best part is these should never change and are backwards compatible

APIs Stands for Application Programming Interface – What does this really mean in terms of developing and designing things? The reinvention of HTML with HTML5 added support for a number of new features: – Local storage – 2D drawing – Offline support – Sockets and threads – Geolocation

HTML5 These APIs are used through the cooperation of a series of different tools – HTML5/DOM to specify structure – CSS3 to handle presentation – JavaScript to add interactivity/cool things

What Is JS? Similar to but not based upon Java programming language Unlike PHP, JS is clientside scripting – It depends heavily upon what it being used to view the website – It is often disabled – It is visible in the source material of the website

JS Do’s and Dont’s Design to support the user’s visit to your site – Avoid popups, annoying scripts, excessive “bling” for bling’s sake JS should “degrade gracefully” – They know if they will be able to run or not and quietly fail if methods they make use of are not supported If you disable JS your site should still be accessible and useable

Implementation JS can be embedded as an external script or written directly into a page //JS Creating an external JS will allow you to apply changes consistently throughout the site but is unwieldy for one off effects

Writing JS JS is written as a series of statements – Unlike PHP JS WILL terminate with a line break or a semi-colon You must declare a variable before using it – Use the key var before the variable name to declare it – They can be initialized at declaration but don’t need to be Variables are case sensitive

Data Types There are several basic data types – Strings are wrapped in ‘’ or “” – Numbers – Booleans can be true/false or 0/1 – Arrays

Arrays Arrays are a special type of variable that can contain many values at once: – Like a box that holds several different things at once Arrays are declared like normal variables but they have a slightly different feature. – var array1 = new Array(); – Or: var array2 = [‘cats’, ‘dogs’, ‘bunnies’, ‘hamsters’];

Operators JS has two categories of operators – Math +, -, *, /, ++, -- – Comparison >, =, <= === !== – Logical are a sub-category of comparison &&, ||, !

Conditional If statements – If(2 <1){alert(‘Something is Wrong’);] if…else is also accepted if (2<1){ alert(‘Something is wrong’); } else { Alert(‘Everything is fine’); } (2<1) ? alert(‘Something is wrong’) : alert (‘Everything is fine’); Switch Statements

Loops Very similar to other languages var i = 10; while (I >=0 ){ Alert (i); i--; } While, Do…while, For