HTML Forms. CITS3403 Agile Web Development. 2018, Semester 1

Similar documents
CITS3403 Agile Web Development Semester 1, 2016

HTML 5 and CSS 3, Illustrated Complete. Unit K: Incorporating Video and Audio

What is HTML5? The previous version of HTML came in The web has changed a lot since then.

2.1 Origins and Evolution of HTML

New Media Production HTML5

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.

16. HTML5, HTML Graphics, & HTML Media 웹프로그래밍 2016 년 1 학기 충남대학교컴퓨터공학과

HTML5 INTRODUCTION & SEMANTICS

HTML5 - INTERVIEW QUESTIONS

IDM 221. Web Design I. IDM 221: Web Authoring I 1

Web Designing Course

HTML5 INTRODUCTION & SEMANTICS

Developer's HTML5. Cookbook. AAddison-Wesley. Chuck Hudson. Tom Leadbetter. Upper Saddle River, NJ Boston Indianapolis San Francisco

HTML5 INTRODUCTION & SEMANTICS

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Everything you need to know to get you started. By Kevin DeRudder

HTML5. Language of the Modern Web. By: Mayur Agrawal. Copyright TIBCO Software Inc.

HTML5. HTML5 Introduction. Form Input Types. Semantic Elements. Form Attributes. Form Elements. Month Number Range Search Tel Url Time Week

WebKit ; FOR : DUMMIES. by Chris Minnick WILEY. John Wiley & Sons, Inc.

HTML5: MULTIMEDIA. Multimedia. Multimedia Formats. Common Video Formats

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

Programmazione Web a.a. 2017/2018 HTML5

HTML5, CSS3, JQUERY SYLLABUS

8/19/2018. Web Development & Design Foundations with HTML5. Learning Objectives (1 of 2) Learning Objectives (2 of 2) Helper Applications & Plug-Ins

HTML5 a clear & present danger

HTML 5: Fact and Fiction Nathaniel T. Schutta

PHP,HTML5, CSS3, JQUERY SYLLABUS

Brief Intro to HTML. CITS3403 Agile Web Development. 2018, Semester 1

HTML5 MOCK TEST HTML5 MOCK TEST I

Markup Language. Made up of elements Elements create a document tree

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

ID1354 Internet Applications

Techno Expert Solutions An institute for specialized studies!

HTML5 HTML & Fut ure o Web M edi dia Streami a est Work h op, ov 2010 Michael Dale Zohar Babin eve oper o Dev R l e t a i tions & C

footer, header, nav, section. search. ! Better Accessibility.! Cleaner Code. ! Smarter Storage.! Better Interactions.

Flash, Video. How to add Flash movies into your site How to add video and audio to your site HTML5 <video> and <audio> elements

Fundamentals of Website Development

QUICK REFERENCE GUIDE

Welcome to Playlist, the world s easiest to use digital signage software

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Release Date April 24 th 2013

Web Design and Development ACS Chapter 13. Using Forms 11/27/2018 1

Technologies Web Côté client

HTML5 and CSS3: New Markup & Styles for the Emerging Web. Jason Clark Head of Digital Access & Web Services Montana State University Library

IGME-330. Rich Media Web Application Development I Week 1

Advanced Web Programming C2. Basic Web Technologies

Sections and Articles

Web System and Technologies (Objective + Subjective)

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

Index COPYRIGHTED MATERIAL. Symbols and Numerics. </a> element, 25

HTML. HTML Evolution

HTML5 in Action ROB CROWTHER JOE LENNON ASH BLUE GREG WANISH MANNING SHELTER ISLAND

Release Date July 12 th 2013

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

GRAPHIC WEB DESIGNER PROGRAM

CPET 499/ITC 250 Web Systems. Topics

B. V. Patel Institute of Business Management, Computer and Information Technology, UTU. B. C. A (3 rd Semester) Teaching Schedule

JavaScript By: A. Mousavi & P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Row and Column Spans. Homework. Column and Row Span Example (2) Column and Row Span Example. tables: Live Demo. like the following using forms:

MODULE 2 HTML 5 FUNDAMENTALS. HyperText. > Douglas Engelbart ( )

JSN EasySlider Configuration Manual

Joomla! extension JSN EasySlider User Manual

Introduction to HTML5

HTML5 for Java Developers. Sang Shin Founder and Chief Instructor JPassion.com

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Mobile MOUSe WEB SITE DESIGN ONLINE COURSE OUTLINE

Varargs Training & Software Development Centre Private Limited, Module: HTML5, CSS3 & JavaScript

How Libre can you go?

Name of the custom field. It ll be displayed in the meta box. Required. Field type. See the list below for all supported field types. Required.

PIC 40A. Lecture 4b: New elements in HTML5. Copyright 2011 Jukka Virtanen UCLA 1 04/09/14

1.7 Uniform Resource Identifiers and Domain Names 13 URIs and URLs 13 Domain Names 13

Inserting multimedia objects in Dreamweaver

Basics of Web Technologies

Blue Form Builder extension for Magento 2

Lesson 5: Multimedia on the Web

Intelli-Signage Signage Designer Software

COURSE OUTLINE MOC 20480: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Top Trends in elearning. September 15 & 16, Is HTML5 Ready for elearning? Debbie Richards, Creative Interactive Ideas

Course 20480: Programming in HTML5 with JavaScript and CSS3

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

CMPT 165 Notes on HTML5

Adobe Dreamweaver CS6 Digital Classroom

HTML5 and Mobile: New Markup & Styles for the Mobile Web. Jason Clark Head of Digital Access & Web Services Montana State University Libraries

Website Development with HTML5, CSS and Bootstrap

COMS 359: Interactive Media

Programming in HTML5 with JavaScript and CSS3

3.2 Circle Charts Line Charts Gantt Chart Inserting Gantt charts Adjusting the date section...

Programming in HTML5 with JavaScript and CSS3

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0


Basic Steps for Creating an Application with the ArcGIS Server API for JavaScript

Forms iq Designer Training

WEB DESIGNING CURRICULUM

CS144 Notes: Web Standards

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

P3e REPORT WRITER CREATING A BLANK REPORT

Chapter 1. Introducing HTML5. Objectives: Learn what HTML5 is about. Discover what HTML5 really is

Table Basics. The structure of an table

Altus Call Recording. Dashboard Admin User Guide. Document Version Maryland Way, Suite 300 Brentwood, TN Tel

Transcription:

HTML Forms CITS3403 Agile Web Development 2018, Semester 1 Some material Copyright 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.

Forms A form is the usual way to get information from a browser to a server (X)HTML has tags to create a collection of objects that implement this information gathering The objects are called widgets (e.g., radio buttons and checkboxes) When the Submit button of a form is clicked, the form s values are sent to the server All of the widgets, or components of a form are defined in the content of a <form> tag The only required attribute of <form> is action, which specifies the URL of the application that is to be called when the Submit button is clicked action = "http://www.cs.ucp.edu/cgi-bin/survey.pl"»if the form has no action, the value of action is the empty string

Forms (continued) The method attribute of <form> specifies one of the two possible techniques of transferring the form data to the server, get and post you might recognise these in the topic on protocols. Widgets Many are created with the <input> tag»the type attribute of <input> specifies the kind of widget being created Text Text Areas Checkboxes Radio buttons Menus Reset and submit buttons

Form actions Forms have an action attribute which is the script that is executed when the form is submitted. Named fields are posted to the script.

Forms (continued) Text Creates a horizontal box for text input Checkboxes to collect multiple choice input Every checkbox requires a value attribute, which is the widget s value in the form data when the checkbox is checked Radio Buttons collections of checkboxes in which only one button can be checked at a time Every button in a radio button group MUST have the same name Menus created with <select> tags There are two kinds of menus, those that behave like checkboxes and those that behave like radio buttons (the default) Menus that behave like checkboxes are specified by including the multiple attribute, which must be set to "multiple Text areas created with <textarea> Usually include the rows and cols attributes to specify the size of the text area

Forms (continued) Reset and Submit buttons Both are created with <input> <input type = "reset" value = "Reset Form"> <input type = "submit value = "Submit Form"> Submit has two actions: 1. Encode the data of the form 2. Request that the server execute the server resident program specified as the value of the action attribute of <form> A Submit button is required in every form

HTML5 Forms New Attributes placeholder Simplicity autocomplete (on, off) required Consistency autofocus New form controls Validation datalist New input types Frequent design patterns search Contacts (email, url, tel) Slider: range Spinner: number Data/time: date, datetime, datetime local, month, week 7

HTML5 Forms Summary type= text type= submit <textarea> type= radio type= reset <fieldset> type= check type= file <select> <option> type= email type= tel type= url type= date type= search type= range type= number type= color type= date datetime datetime local week month <output>

HTML 5 Forms Build in Validation Native validation without scripting. HTML5 browsers support basic validation on email, url and tel input types. HTML5 has made it even more friendly for web authoring The pattern attribute that allows you to use regular expression to specify required format For example: <input type="tel" id="phone" name="phone" pattern="\d{8}" >

The HTML 5 Way The Mobile Safari changes on-screen keyboard according to different contact input types: Some material Copyright 2010 Jeremy Keith HTML5 For Web Designers by A Book Apart. Edited by Wei Liu. 1 0

HTML 5 Forms: Dates and times One of the most popular JavaScript widgets is the calendar picker. These calendar widgets all do the same thing, but you ll find that they re implemented slightly differently on each site. A native calendar widget would smooth away the inconsistencies and reduce cognitive load during the date picking process. HTML5 introduces a raft of input types specifically for dates and times date is for a year, month, and day. datetime is for a year, month, and day in combination with hours, minutes, and seconds and time zone information. datetime local is the same but without the time zone information. time is for hours, minutes, and seconds. month is for a year and a month but without a day. Some material Copyright 2010 Jeremy Keith HTML5 For Web Designers by A Book Apart. Edited by Wei Liu. 1 1

HTML 5 Forms: Dates and times All of these input types will record timestamps with some subset of the standardized format YYYY MM DDThh:mm:ss.Z (Y is year, M is month, D is day, h is hour, m is minute, s is second, and Z is timezone). Take, for example, the date and time at which World War One ended, 11:11am on November 11th, 1918: date: 1918 11 11 datetime: 1918 11 11T11:11:00+01 datetime local: 1918 11 11T11:11:00 time: 11:11:00 month: 1918 11 There is no year input type, although there is a week input type that takes a number between 1 and 53 in combination with a year. Some material Copyright 2010 Jeremy Keith HTML5 For Web Designers by A Book Apart. Edited by Wei Liu. 1 2

<input type= datetime > is obsolete <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="week"> <input type="month">

The form output element Represent the results of some calculation <form oninput="result.value=parseint(a.value)+parseint(b.value)"> 0<input type="range" name="b" value="50" />100 + <input type="number" name="a" value="10" /> = <output name="result"></output> </form>

The <time> element Encode time and date in formats that are both Machine and Human readable <time datetime=2011-8-12> 12 August 2011</time> <time datetime=2011-8-12> 12 <sup>th</sup> August Last Year</time> <time datetime=2012-8-12>uwa Expo 2012</time> <time datetime=2012-8-12t14:00z>2pm on UWA Expo 2012</time> <time datetime=20:00> 8PM</time> Previously, you could only mark up precise dates, which could be a problem (e.g. historians) 13 November 1905 could be expressed in HTML but not November 1905 <time datetime="1905-11-13"> Now, "fuzzy dates" are possible: <time datetime="1905"> means the year 1905 <time datetime="1905-11"> means November 1905 <time datetime="11-13"> means 13 November (any year) <time datetime="1905-w21"> means week 21 of 1905

The <time> element Durations In HTML5 <time>, you can represent durations, with the prefix "P" for "period". The datetime attribute value: "D" for days, "H" for hours, "M" for minutes and S" for seconds. You can separate them with spaces (but you don't have to). <time datetime="p4d"> is a duration of 4 days, same as <time datetime="p 4 D"> Using a "T" after the "P" marker allows you to be more precise: <time datetime="pt23h 9M 2.345S"> is a duration of 23 hours, 9 minutes and 2.345 seconds. The pubdate attribute is a boolean to indicate when a page is published http://introducinghtml5.com/errata/ch02.html

The audio Element Prior to HTML5, a plug in was required to play sound while a document was being displayed Audio encoding algorithms are called audio codecs e.g., MP3, Vorbis Coded audio data is stored in containers e.g., Ogg, MP3, and Wav (file name extension indicates the container, not the audio code) Vorbis code is stored in Ogg containers MP3 code is stored in MP3 container Wav code is stored in Wav containers Some material Copyright 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Edited by Wei Liu.

The audio Element (continued) General syntax: <audio attributes> <source src = "filename 1 " >... <source src = "filename n " > Your browser does not support the audio element </audio> The controls attribute, which is set to controls", creates a start/stop button, a clock, a progress slider, total time of the file, and a volume slider <!DOCTYPE html> <! audio.html Test the audio element --> <html lang = "en" > <head> <title> Test audio element </title> <meta charset = "utf-8" /> </head> <body> This is a test of the audio element <audio controls = "controls" > <source src = "nineoneone.ogg" /> <source src = "nineoneone.wav" /> <source src = "nineoneone.mp3" /> Your browser does not support the audio element </audio> </body> </html>

The video Element Prior to HTML5, there was no standard way to play video clips while a document was being displayed <video width = "600" height = "500 autoplay = "autoplay" controls = "controls" preload = "preload"> <source src = " /> <source src = " /> Your browser does not support the video element </video> The width and height attributes set the screen size The autoplay attribute, set to "autoplay", specifies that the video should play as soon as it is ready The preload attribute, set to "preload", specifies that the video should be loaded as soon as the document is loaded

The video Element (continued) <!DOCTYPE html> <!-- testvideo.html test the video element --> <html lang = "en"> <head> <meta charset = "UTF-8" /> <title> test video element </title> </head> <body> This is a test of the video element... <video width = "600" height = "500 autoplay = "autoplay" controls = "controls" preload = "preload"> <source src = "NorskTippingKebab.mp4" /> <source src = "NorskTippingKebab.ogv" /> <source src = "NorskTippingKebab.webm" /> Your browser does not support the video element </video> </body> </html>

The video Element (continued) Video codecs: H.264 (MPEG 4 AVC) can be stored in an MPEG 4 container Theora can be stored in any container VP8 can be stored in WebM container Video codecs are stored in containers Common containers MPEG 4 (.mp4), Flash Video (.flv), Ogg (.ogv), WebM (.webm) and Audio Video Interleave (.avi). Convert video format free online: http://video.online convert.com/ Some material Copyright 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Edited by Wei Liu.

HTML 5 Canvas Demo The HTML <canvas> element is used to draw graphics on the fly, via scripting (usually javascript) The Canvas element is only a container for graphics and you use a script to draw the graphics. Canvas has several methods for drawing paths boxes, circles, text and adding images. https://developer.mozilla.org/en/canvas_tutorial http://www.blobsallad.se/ 2 2

Offline Data Storage The coolest part about HTML5 is definitely its offline capabilities. Programs like Thunderbird and Outlook (and now GMail to an extent) let you browse through your old data while staying offline. With HTML5, you ll have this same functionality, but in the browser. This is the first serious step towards bridging the gap between the desktop and the Web, and opens all sorts of doors for the future of Web apps. The W3C has taken the best parts from the various Web technologies and rolled them into, what is being dubbed the most powerful markup language to date. Four storage APIs: Web Storage, Web SQL Database, Indexed Database, and File Access Two main purposes: offline access and performance. More details at: http://www.html5rocks.com/en/tutorials/offline/storage/ 2 3

Some other features of the HTML5 APIs Drag & Drop The drag and drop API defines an event based drag and drop system. However, it never defines what "drag and drop" is. This API requires JavaScript to fully work as normal think drag and drop functionality. Geolocation Geolocation is a very cool API available within HTML5. Its object can be used to programmatically determine location information through a device s user agent (hint: mobile devices). 2 4

Useful Cheat Sheet HTML5 Quick Reference http://adactio.com/extras/pocketbooks/html5/ HTML5 and HTML4 Comparison at a Glance http://websitesetup.org/html5 cheat sheet.pdfhtml5 Canvas http://www.cheat sheets.org/saved copy/html5_canvas_cheat_sheet.pdf 2 5