CSS Review. Objec(ves. Iden(fy the Errors. Fixed CSS. CSS Organiza(on

Similar documents
1 Form Basics CSC309

HTML Forms. By Jaroslav Mohapl

CSE 154 LECTURE 8: FORMS

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics

Spring 2014 Interim. HTML forms

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity

CSE 154 LECTURE 9: SUBMITTING DATA (POST)

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM)

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

CSE 154 LECTURE 9: SUBMITTING DATA (POST)

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

Building Web Based Application using HTML

COMS 359: Interactive Media

PHP with MySQL: What you need to know Chapter 3. This section is on using PHP script tags appropriately in your PHP program.

COMP1000 Mid-Session Test 2017s1

Dreamweaver: Web Forms

HTML 5 Tables and Forms

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Static Webpage Development

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

Comp-206 : Introduction to Software Systems Lecture 23. Alexandre Denault Computer Science McGill University Fall 2006

HTML Forms. 10 September, Dr Derek Peacock. This is a short introduction into creating simple HTML forms. Most of the content is

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

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

FrontPage 2000 Tutorial -- Advanced

By completing this practical, the students will learn how to accomplish the following tasks:

Web Technologies - by G. Sreenivasulu Handout - 1 UNIT - I

Website Development with HTML5, CSS and Bootstrap

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Web Designing Course

Creating and Building Websites

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

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown

Summary 4/5. (contains info about the html)

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

CSS CSS how to display to solve a problem External Style Sheets CSS files CSS Syntax

Table Basics. The structure of an table

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

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

Web Forms. Survey or poll Contact us Sign up for an newsletter Register for an event

Web Design & Dev. Combo. By Alabian Solutions Ltd , 2016

Creating HTML files using Notepad

Appendix D CSS Properties and Values

In the early days of the Web, designers just had the original 91 HTML tags to work with.

Forms 4/3/2018. Two way communication. Sending Data from Client to Server. One way communication:

1. Cascading Style Sheet and JavaScript

HTML and JavaScript: Forms and Validation

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

HTML WORKSHEET Explain HTML HEAD Tag Title Tag BASEFONT Tag

HTML and CSS MIS Konstantin Bauman. Department of MIS Fox School of Business Temple University

Last &me: Javascript (forms and func&ons)

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

HTML Forms IT WS I - Lecture 11

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

HTML Form. Kanida Sinmai

HTTP and HTML. We will use HTML as a frontend to our webapplications, therefore a basic knowledge of HTML is required, especially in forms.

ART170. The ART170 Final Project

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

HTML: Fragments, Frames, and Forms. Overview

Introduction to using HTML to design webpages

NEW WEBMASTER HTML & CSS FOR BEGINNERS COURSE SYNOPSIS

Html basics Course Outline

Introduction to WEB PROGRAMMING

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Creating Web Pages Using HTML

CS 1100: Web Development: Client Side Coding / Fall 2016 Lab 2: More HTML and CSS

Web Designing HTML5 NOTES

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU

Hyperlinks, Tables, Forms and Frameworks

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

Meijer.com Style Guide

OU EDUCATE TRAINING MANUAL

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security

With HTML you can create your own Web site. This tutorial teaches you everything about HTML.

Website Design (Weekday) By Alabian Solutions Ltd , 2016

CS105 Course Reader Appendix A: HTML Reference

Forms, CGI. Objectives

SYBMM ADVANCED COMPUTERS QUESTION BANK 2013

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

HTML Forms & PHP. Database Systems CSCI Dr. Tom Hicks Computer Science Department


1 of 7 11/12/2009 9:29 AM

Virto SharePoint Forms Designer for Office 365. Installation and User Guide

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

Chapter 3 HTML Multimedia and Inputs

CSS: The Basics CISC 282 September 20, 2014

Simple Form Documentation

HTML. HTML Evolution

Website Design (Weekend) By Alabian Solutions Ltd , 2016

Web Site Development with HTML/JavaScrip

Web development using PHP & MySQL with HTML5, CSS, JavaScript

CSS: Cascading Style Sheets

Deccansoft Software Services

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

Lab Introduction to Cascading Style Sheets

PBwiki Basics Website:

Transcription:

Objec(ves CSS Review Discuss: Ø How Google Search Works Ø What Images You Can Use HTML Forms CSS Review Why CSS? What is the syntax of a CSS rule? What is the order of applying rules in the cascade? How can we apply a rule to a par(cular element? How did Lab 1 go? April 28, 2016 Sprenkle - CSCI335 1 April 28, 2016 Sprenkle - CSCI335 2 Iden(fy the Errors Fixed CSS <style> body { background-color: white <style> body { background-color: white; } h1, { gray; font-family: sans-serif; } h2, p { color: } <em> { font-style: italic; } </style> h1, { color: gray; font-family: sans-serif; } h2, p { color: blue; } <em> { font-style: italic; } </style> Could be other ways to fix the errors April 28, 2016 Sprenkle - CSCI335 3 April 28, 2016 Sprenkle - CSCI335 4 CSS Organiza(on Using Bootstrap Ø Create your own separate CSS file and put your changes in that file Ø Your custom CSS file should go a\er the Bootstrap CSS file in the head element GOOGLE SEARCH April 28, 2016 Sprenkle - CSCI335 5 April 28, 2016 Sprenkle - CSCI335 6 1

Google Search Discussion How does Google s search work? What are some of its novel features? What are some recommenda(ons for web masters? Ø Any surprises? Why is search engine op(miza(on important? Ø It s so important that it has its own acronym: SEO Google Search Discussion What are Google search s limita(ons? Ø How can it be manipulated? What features would you like to add to Google s searching technique (or other search engine)? What is your preferred search engine? Why? April 28, 2016 Sprenkle - CSCI335 7 April 28, 2016 Sprenkle - CSCI335 8 Google Search Discussion Knowing more about Google search, will you change your queries any? Ø How can you make them more effec(ve? Ø How can you save yourself (me? Now that you re an author of HTML documents, will you change them to get a higher rank on Google? Ø How could you do that? Simplified Google PageRank Developed by Larry Page and Sergei Brin Ø Then graduate students at Stanford University How do we know what a page is about? Ø One approach: What text do people use to link to it? How should we rank pages? Ø By number of links to it Ø By popularity of pages that link to it April 28, 2016 Sprenkle - CSCI335 9 April 28, 2016 Sprenkle - CSCI335 10 What Can You (Legally) Take From the Web? INTERNET COPYRIGHT April 28, 2016 Sprenkle - CSCI335 11 April 28, 2016 Sprenkle - CSCI335 12 2

What Can You (Legally) Take From the Web? What you take, why you take, who you are, what technology you use Ø Commercial or non-profit Ø Amount and substan(ality of por(on used Ø Nature of copyrighted work What is fair use? Tough ques*on! Ø Rules change as technologies change Web Interfaces Menus Ø Sidebars, links, naviga(on GUIs Forms Today s focus April 28, 2016 Sprenkle - CSCI335 13 April 28, 2016 Sprenkle - CSCI335 14 HTML form Tag Used to provide web applica(on input from the user Contains various controls or widgets (sources of input) and labels for controls Must have a submit bugon that transmits all input data to server as a query string Examples of Forms/Input Browser HTTP Request URL, Data Web App Server April 28, 2016 Sprenkle - CSCI335 15 April 28, 2016 Sprenkle - CSCI335 16 HTML form Tag form agributes: Ø action (required): URL to send request to Rela(ve or absolute Ø method: get or post Default: Get More on differences later <form action="/search"> <!-- input fields, etc. --> </form> Input From Forms Types of input data Ø Text Ø Checkbox Ø Radio bugons Ø Select from list Ø Password Data is iden(fied by a name, has a value Ø Specified by input fields name agributes April 28, 2016 Sprenkle - CSCI335 17 April 28, 2016 Sprenkle - CSCI335 18 3

Simplified Form for Google Search <form action="/search"> <p> <input type="text" name="q" size="55"/> <input type="submit" value="google Search" name="btng"/> </p> </form> Form is submiged to Google s /search page with data q set to whatever user entered in box, e.g., Ø http://www.google.com/search? q=user_query search.html April 28, 2016 Sprenkle - CSCI335 19 Another Way to Invoke A Web Applica(on Example: My digital library Ø Keeps publica(ons, presenta(ons Create a link to Ø http://servo.cs.wlu.edu/pubs/browse? type=author&starts_with=m Browser sends a GET request to the server s dspace/browse page Ø 2 Data Parameters: name is type, which has value author name is starts_with, which has value M April 28, 2016 Sprenkle - CSCI335 20 Query Strings Do you always want your input data to show up in the URL? get vs post get passes parameters to server as a query string Ø Limited to browser's URL length (2048 characters) post embeds the parameters in HTTP request Ø Not in the URL April 28, 2016 Sprenkle - CSCI335 21 April 28, 2016 Sprenkle - CSCI335 22 get vs post Advantages of post Informa(on is more private (not shown in URL) Can t be bookmarked Disadvantages of post Can't be bookmarked Browser can't easily go back (POSTDATA error) input Tag Used to create many of the widgets type agribute specifies the type of widget Must be inside a block-level element Always close tag when opened Ø Contains agributes Examples: Ø text, checkbox, radio O\en requires name agribute Ø Names the data that will be sent to the Web applica(on April 28, 2016 Sprenkle - CSCI335 23 April 28, 2016 Sprenkle - CSCI335 24 4

Text input A horizontal box that the user can input text into <input type="text" name="name" size="25"/> ADributes: size maxlength value Width of text box in characters; scrolls if user types more Maximum number of characters browser accepts in a box Provide a default value Examples of when to use this? April 28, 2016 Sprenkle - CSCI335 25 Password input A horizontal box that the user can input text into but the text displays as *s or s <input type="password" name="mypassword" size="10" maxlength="10"/> ADributes: size Width of text box in characters; scrolls if user types more maxlength Maximum number of characters browser accepts in a box April 28, 2016 Sprenkle - CSCI335 26 Labeling input fields Label a control with the label tag Beger than labeling with other text because Ø Can get separated during maintenance Ø label has special presenta(on Ø Improved usability <p> Password: <input type="password" name="mypassword" size="10" maxlength="10"/> </p> textbox.html April 28, 2016 Sprenkle - CSCI335 27 Mul(ple Choice Input: checkbox Use when user has mul(ple choices for something and can choose >= 1 ý Milk Bread Eggs Only items that user checks are sent by the form to the ac(on loca(on checkbox.html April 28, 2016 Sprenkle - CSCI335 28 Mul(ple Choice Input: checkbox All checkboxes in a group have the same name Checkbox requires a value agribute Ø value is submiged in the form data iff the checkbox is checked To make a checkbox checked, the checked agribute is set to checked value="milk" checked="checked"/>milk April 28, 2016 Sprenkle - CSCI335 29 Mul(ple Choice Input: checkbox value="milk" checked="checked"/>milk value="bread"/>bread value="eggs"/>eggs Notice order of label/input, Label and value are different ý Milk Bread Eggs April 28, 2016 Sprenkle - CSCI335 30 5

Mul(ple Choice Input: checkbox Discussion: When designing a form, when should a checkbox be checked by default? value="milk" checked="checked"/>milk Mul(ple Choice Input: checkbox Discussion: When designing a form, when should a checkbox be checked by default? Ø Common value that people will always want Have you ever seen a checkbox turned on when you think it shouldn t be? value="milk" checked="checked"/>milk April 28, 2016 Sprenkle - CSCI335 31 April 28, 2016 Sprenkle - CSCI335 32 Mul(ple Choice Input: radio Only one radio bugon in a group can be on or pressed Ø Groups of radio bugons are iden(fied with the same name Why is radio appropriate? <input type="radio" name="age" value="under20" checked="checked"/>0-19 <input type="radio" name="age" value="20-35"/>20-35 <input type="radio" name="age" value="over65"/>>65 Same name 0-19 20-35 >65 April 28, 2016 Sprenkle - CSCI335 33 Alterna(ve for label Use for agribute to specify which control you re labeling Ø for s value is the control s id <label for="age.under18">0-17 <input id="age.under18" type="radio" name="age" value="under18"/> Important for usability April 28, 2016 Sprenkle - CSCI335 34 Menus with <select> Displays large number of op(ons more compactly Can emulate radio bugons (only one selec(on, default) or checkboxes (mul(ple selec(ons) name size multiple Name of the data # of items to display <select name="age"> </select> Allows mul(ple selec(ons if value is multiple April 28, 2016 Sprenkle - CSCI335 35 option tag Value op(ons are in option tags, nested inside of select tags Can preselect an op(on with selected agribute set to selected <select name="age"> <option value="under20" selected="selected">0-19</option> <option value="20-35">20-35</option> <option value="over65">> 65</option> </select> April 28, 2016 Sprenkle - CSCI335 36 6

select Tag Example Emula(ng checkboxes <select name="groceries" multiple="multiple"> <option value="milk" selected="selected">milk</option> <option value="bread">bread</option> <option value="eggs">eggs</option> </select> Using select Any advantages or disadvantages to using select rather than radio bugons or checkboxes? Alterna(ve Example: April 28, 2016 Sprenkle - CSCI335 37 April 28, 2016 Sprenkle - CSCI335 38 Using select Any advantages or disadvantages to using select rather than radio bugons or checkboxes? Ø select takes up less space when only one selec(on BUT user must click to see all op(ons Op(on Groups: optgroup Tag used to group op(ons with a label Ø Can also apply a style to label <select name="entree"> <optgroup label="seafood"> <option value="crabcakes">crab Cakes</option> </optgroup> <optgroup label="vegetarian"> <option value="spaghetti">spaghetti</option> </optgroup> </select> April 28, 2016 Sprenkle - CSCI335 39 April 28, 2016 Sprenkle - CSCI335 40 textarea Tag Allows users to input mul(ple lines of text name rows cols Name of the data # of rows for text area # of characters wide for text area <p>please provide your yearbook memories:</p> <p><textarea name="memories" rows="3" cols="40"> (Be brief and concise.) </textarea></p> Can t close the tag when opened. Needs content, even if empty. Displayed by default in the text area. April 28, 2016 Sprenkle - CSCI335 41 Grouping Input: fieldset, legend fieldset: groups related input fields legend: supplies an op(onal cap(on <fieldset> <legend>credit cards:</legend> <input type="radio name="creditcards" id="visa" /> <label for="visa">visa <br /> <input type="radio" name="creditcards" id="mastercard" /> <label for="mastercard">mastercard <br /> <input type="radio" name="creditcards" id="amex" /> <label for="amex">american Express<br /> </fieldset> April 28, 2016 Sprenkle - CSCI335 42 See bugons.html 7

submit and reset Bugons type = submit Ø When clicked, browser sends parameters to the server Ø Browser shows server s response type = reset Ø when clicked, browser changes the controls back to their original state <input type="submit" value="submit Query"/> <input type="reset" value="reset"/> April 28, 2016 Sprenkle - CSCI335 43 Styling Forms with CSS Agribute Selectors input[type="text"] { color: blue; font-style: italic; margin-bottom: 2em; } element[attribute=value] { properties; } CSS agribute selector affects an element only if it has the given agribute set to the given value O\en used with forms because input element represents many different controls April 28, 2016 Sprenkle - CSCI335 44 Considera(ons for Choosing Controls How easy is it for the user to enter the input? What is the range of possible values? How many possible values are there? How much flexibility does the user have? Ø How much should they have? Should the data be hidden in the browser? What input would you use? Input Data Input Type Gender Sensi(ve data Date (month, day, and year) Abstract for a paper Title for a song Household Income Bracket April 28, 2016 Sprenkle - CSCI335 45 April 28, 2016 Sprenkle - CSCI335 46 TODO Lab 2: HTML Forms Ø Due tonight at midnight Requirements, Design, Work Plan Documents on Wiki Friday Ø Coordina(on/coopera(on, division of responsibili(es Ø Does this work? Ø Due Friday at midnight April 28, 2016 Sprenkle - CSCI335 47 8