10/1/2015 ©2006 Scott Miller, University of Victoria 1 HTML: The sequel Forms JavaScript DHTML HTML Practical Tutorial Rev 2.0.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

Farhan Nisar University of Peshawar
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
UNIT 12 LO4 BE ABLE TO CREATE WEBSITES Cambridge Technicals.
The Web Warrior Guide to Web Design Technologies
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
1 HTML Markup language – coded text is converted into formatted text by a web browser. Big chart on pg. 16—39. Tags usually come in pairs like – data Some.
Tutorial 6 Working with Web Forms
Markup Languages Controlling the Display Of Web Content.
Computing Concepts Advanced HTML: Tables and Forms.
23-Jun-15 HTML. 2 Web pages are HTML HTML stands for HyperText Markup Language Web pages are plain text files, written in HTML Browsers display web pages.
Web Page Development Identify elements of a Web Page Start Notepad
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
© Ms. Masihi 1.  A web page is created using a language called, Hypertext Markup Language, better known as HTML Code.  HTML is a user friendly language.
Chapter 14 Introduction to HTML
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Creating a Simple Page: HTML Overview
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
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.
July 2007 Web Design Developing a Class Website for the Tsunami Shelter Challenge Rozeanne Steckler
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
HTML 4.0 History and Application By: Marc Mayzes.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
HTML Forms and Scripts. Session overview What are forms? Static vs dynamic Client-side scripts –JavaScript.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Chapter 2 Developing a Web Page. A web page is composed of two distinct sections: –The head content –The body Creating Head Content and Setting Page Properties.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
INTRODUCTION. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language,
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Website Development with PHP and MySQL Saving Data.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
HTML: Hyptertext Markup Language Doman’s Sections.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
Chapter 5: Windows and Frames
ITCS373: Internet Technology Lecture 5: More HTML.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
LEARNING HTML PowerPoint #1 Cyrus Saadat, Webmaster.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
Computational Boot Camp HTML Mike Schaffer. 8/23/2002 (MES) HTML What is HTML? HTML stands for HyperText Markup Language HTML is the language for publishing.
L. Anne Spencer (c) 2001 Basic Web Design Document, text, & layout formatting tags & attributes.
Jan 2001C.Watters1 World Wide Web and E-Commerce Client Side Processing.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Basic Document Structure.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
HTML tags and attributes By: Dennis Champagne. List of tags.
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
1 HTML: HyperText Markup Language Representation and Management of Data on the Internet.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
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.
Introduction to HTML Dave Edsall IAGenWeb County Coordinator’s Conference June 30, 2007.
DHTML.
Introduction to HTML.
Teaching slides Chapter 6.
Computer communications
Presentation transcript:

10/1/2015 ©2006 Scott Miller, University of Victoria 1 HTML: The sequel Forms JavaScript DHTML HTML Practical Tutorial Rev 2.0

10/1/2015 ©2006 Scott Miller, University of Victoria 2 HTML Forms Forms are crucial when developing web applications that require interactive input from the user –HTML Forms contains elements such as buttons, text boxes, pop-ups, check boxes, etc. –Simple HTML construct using these elements for user input –Submits information via POST method as key-value pairs in body of request POST is better method to send data as GET has max of 256 characters

10/1/2015 ©2006 Scott Miller, University of Victoria 3 Example - Forms Username: Password: Keep me logged in OK Me.com Webserver SMTP ForgotPWD.pl DB Login.pl CGI Select From Username Set accept cookie SMTP <form name=“login” method=“post” action=“ Username: Password:

10/1/2015 ©2006 Scott Miller, University of Victoria 4 Example - Form Request POST /cgi-bin/Login.pl HTTP/1.1 Content-Length: 42 Content-Type: url-encoded-form/UTF-8 Host: User-Agent: Internet Explorer username=scott pwd=foo sbutton=MySpoonIsTooBig

10/1/2015 ©2006 Scott Miller, University of Victoria 5 JavaScript Used for presentation (formatting), form validation, cookie creation, browser detection and more Parsed on the client side Scripting embedded inside tags –Tags can be embedded throughout web pages Used heavily for event handling

10/1/2015 ©2006 Scott Miller, University of Victoria 6 JavaScript Main uses: –Form validation –Action driven content (mouse-overs) –Read/Write HTML elements Problems: –Horrible task of code mixed in with presentation – makes for a maintenance nightmare –Limited trust for client-side form validation –Can lead to security issues as well JavaScript ≠ Java

10/1/2015 ©2006 Scott Miller, University of Victoria 7 JavaScript – Case Study Form Validation –Saves Bandwidth –Saves CPU time on web server (eases the load for other clients with more serious needs) Verifies the form(s) is completely and correctly filled out –E.g. Ensure phone number in format of (xxx)xxx- xxxx Verifies form on client side BEFORE bothering the web server Can use any client side scripting language to do this (JavaScript, VBScript, etc.)

10/1/2015 ©2006 Scott Miller, University of Victoria 8 JavaScript – Case Study JavaScript can access all forms on a page via the “forms” array (which is a property of the “document” object –document.forms[0].elements.length –document.forms[0].username.value e.x. function verify() { alert(“Form Verified”) }

10/1/2015 ©2006 Scott Miller, University of Victoria 9 JavaScript - Example function verify() { alert(“Form Verified”) } Example 1 Example 2

10/1/2015 ©2006 Scott Miller, University of Victoria 10 JavaScript – More Cases Another example of JavaScript Places you’ll find JS –Client: embedded in HTML, inside Applets –Server: JSPs, Servlets (  CGI program generates JS) Country: Province/State: Canada B.C. Choose Constrains

10/1/2015 ©2006 Scott Miller, University of Victoria 11 Dynamic HTML : DHTML DHTML is simply a term for HTML, CSS, and JavaScript all used together –HTML presentation, CSS formatting for presentation, JavaScript “dynamic content”. Not used for Dynamic Content (as in web applications: DB queries, user authentication, etc.), but for more interactive presentation –e.x. Separate pages for specific browsers, different content based on cookie settings for presentation, mouse-over/click events, etc.

10/1/2015 ©2006 Scott Miller, University of Victoria 12 HTML Tutorial A Short Practical Overview of the Markup Language, Elements and Basic Tags Rev 2.0

10/1/2015 ©2006 Scott Miller, University of Victoria 13 Review of Basic HTML Syntax There are 3 parts to an HTML tag –Start Tag –Contents –End Tag e.x. This is bold Tags denote the formatting of the text (contents) between the start and end tags Tags denote elements, such as forms, tables, etc. –Elements are objects within a web page Tags are all lowercase

10/1/2015 ©2006 Scott Miller, University of Victoria 14 HTML Basics Like any language, comments are available to use and make your code more clear – –SSI and similar languages use comment blocks to enter their own code All HTML documents contain the following components: –, : entire document –, : head section; includes page title, scripting functions, meta information, CSS includes, etc. –, : bulk of the document; the viewable portion

10/1/2015 ©2006 Scott Miller, University of Victoria 15 HTML Basics: Common Tags Common formatting tags – : Sets the title in the browser’s bar – : Sets text bold – : Sets text italic – : Displays as code –,,etc.: Display as (sub)header – : Paragraph – : Add a line break – : Adds a horizontal line

10/1/2015 ©2006 Scott Miller, University of Victoria 16 HTML Basics: Attributes Many HTML elements have attributes to add additional formatting –e.g. Many HTML tags have 1 or more of these attributes, which makes them very hard to list –While building your own pages, any decent reference will list the attributes with each tag you use

10/1/2015 ©2006 Scott Miller, University of Victoria 17 HTML Basics: Entities Certain characters cannot be written as literals (e.g. &), so these entities are denoted in another way –&lt = < –&amp = & –&gt = > –&quot = “ –&apos = ‘ –&nbsp = space (non-breaking space) –&divide = division sign –&copy = ©

10/1/2015 ©2006 Scott Miller, University of Victoria 18 HTML Basics: Hyperlinking : Sets an anchor point Example: – text to display as this link : open link into a new window In-page anchors are used to link to references on the same page. They are usually used for TOC on large pages –e.x. Anchor

10/1/2015 ©2006 Scott Miller, University of Victoria 19 HTML Basics: Frames Frames display SEPARATE PAGES in different defined areas of a single view –Good for menus, navigation –e.x.

10/1/2015 ©2006 Scott Miller, University of Victoria 20 HTML Basics: Tables Tables are very easy to build in HTML – : defines a table – : defines a row – : defines a boundary for a column

10/1/2015 ©2006 Scott Miller, University of Victoria 21 HTML Basics: Images General form to include an image: – If only a filename is present, the current directory is assumed Relative paths (src=“/images/1.gif”) are allowed –alt attribute writes alterative text if the picture is unavailable, or the browser can’t display images Images can be used to make image maps – These are images where different areas of the image link to different resources

10/1/2015 ©2006 Scott Miller, University of Victoria 22 HTML Basics: Colour and Backgrounds Many elements in HTML can have colour defined –e.x. …= “#000000” …= “black” …= “rgb(0,0,0)” Background images can be added in much the same way –e.x. Note: although these colour and background tags work, most colour in any element (not just body) has been depreciated. All style is supposed to be done through Style Sheets

10/1/2015 ©2006 Scott Miller, University of Victoria 23 Final Thoughts As mentioned, any formatting in the HTML web page itself will work, but proper coding style now dictates formatting should be done with Style Sheets Once you have become more comfortable with HTML, JavaScript, Style Sheets, and languages like SSI are very easy to pick up