Human Computer Interaction

Slides:



Advertisements
Similar presentations
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Advertisements

Introduction to HTML & CSS
Introduction to JavaScript Module 1 Client Side JS Programming M-GO Sponsored By
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
CIS101 Introduction to Computing
Computing Concepts Advanced HTML: Tables and Forms.
Introduction to HTML 2006 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Chapter 14 Introduction to HTML
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
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.
INTRODUCTION TO DHTML. TOPICS TO BE DISCUSSED……….  Introduction Introduction  UsesUses  ComponentsComponents  Difference between HTML and DHTMLDifference.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Web Technologies Website Development Trade & Industrial Education
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Website Development with Dreamweaver
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Css. Definition Cascading style sheet (CSS) Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Web Programming Basics of HTML. HTML stands for Hyper Text Mark-up Language A mark-up language is different than those that you have learned before in.
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
HTML: Hyptertext Markup Language Doman’s Sections.
JavaScript - A Web Script Language Fred Durao
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Introducing Cascading Style Sheets. Cascading Style Sheet Basics  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
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.
1 © Netskills Quality Internet Training, University of Newcastle Using Style Sheets in Dreamweaver CS © Netskills, Quality Internet Training, University.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
Positioning Objects with CSS and Tables
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
A gentle introduction to Bootstrap MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/18/
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
A gentle introduction to Bootstrap TDAP Jeremy Shafer Department of MIS Fox School of Business Temple University Spring
Getting Started with HTML
Online PD Basic HTML The Magic Of Web Pages
DHTML.
Web Basics: HTML/CSS/JavaScript What are they?
Project 1 Introduction to HTML.
Objective % Select and utilize tools to design and develop websites.
PHP MySQL Crash Course with HTML CSS
>> Introduction to CSS
HTML & teh internets.
W3C Web standards and Recommendations
© 2016, Mike Murach & Associates, Inc.
Objective % Select and utilize tools to design and develop websites.
Section 10.1 YOU WILL LEARN TO… Define scripting
Revision.
Skills learned in Lab 1 Web GUI framework HTML tags and attributes
Web Programming A different world! Three main languages/tools No Java
HTML A brief introduction HTML.
Introduction to Web Page Design
Tutorial 6 Creating Dynamic Pages
Input CS 422: UI Design and Programming
Teaching slides Chapter 6.
Javascript and JQuery SRM DSC.
Introduction to Web Application Design
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Computer communications
Web Development 101 Workshop
HTML &CSS and Make a website with coding
Web Programming and Design
Web Programming and Design
Web Programming and Design
© 2017, Mike Murach & Associates, Inc.
Presentation transcript:

Human Computer Interaction Lab 1 Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Lab Objective Learn how to design and implement user interface like Candy Crush Lab material by Dr. Mai Elshehaly

What you’ll learn in this lab Web GUI framework HTML tags and attributes <div> elements CSS layout Understand what is being given to us in the code skeleton Understand what is the target outcome of this assignment <input> element Adding functionality with JavaScript Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Web GUI Framework GUI = Graphical User Interface HTML5 is a markup language for creating web pages HTML Tags specify the structure of the document <html> <head> </head> <body> </body> </html> Lab material by Dr. Mai Elshehaly

HTML Example: (any text editor, Sublime text is great!) Master Internet Volunteer Program 09/22/97 HTML Example: (any text editor, Sublime text is great!) <HTML> <HEAD> <TITLE> Candy Crush Game </TITLE> </HEAD> <BODY> Nothing here yet </BODY> </HTML> Tech help should be a local or toll-free call Is it available when you are using the net? Will you get a real person or have to leave voice mail? (voice mail is OK if the response time is fast and during a time you are not connected) Try calling tech support before subscribing. Lab material by Dr. Mai Elshehaly University of Minnesota Extension Service 9

The <div> element Container You can add anything in it Lab material by Dr. Mai Elshehaly

What the current code looks like index.html Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly

Let’s code something simlar Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Web GUI Framework The appearance of your web page (i.e. document) is specified with Cascade Style Sheets (CSS) Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly CSS Selectors Go to: http://www.w3schools.com/css/css_examples.asp Test the id selector Test the class selector (for all elements) Test the class selector (for only <p> elements) Test the grouping selectors Lab material by Dr. Mai Elshehaly

Defining id and class in the HTML document Many elements can be of the same class id is unique (only one element should have this id) Lab material by Dr. Mai Elshehaly

Adding id and class attributes to your file Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Now we can use CSS to select and style different elements using either their id or class You can write style in the HTML file You can create a file.css and use it You can use existing libraries like Bootstrap Lab material by Dr. Mai Elshehaly

Let’s start simple  use Bootstrap You need to be connected to the Internet to link your code to the Bootstrap library You can download a version of the library and keep a local version and link to that Lab material by Dr. Mai Elshehaly

W3 Schools: Bootstrap Grid Layout Lab material by Dr. Mai Elshehaly

Bootstrap col classes for grid layout The Bootstrap grid system has four classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). The classes can be combined to create more dynamic and flexible layouts. We will use class col-md-4 Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly In your code Lab material by Dr. Mai Elshehaly

Now the page looks like this Lab material by Dr. Mai Elshehaly

What you’ll learn in this lab Web GUI framework HTML tags and attributes <div> elements CSS layout Understand what is being given to us in the code skeleton Understand what is the target outcome of this assignment <input> element Adding functionality with JavaScript Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Before we continue Let’s see what the game is about Lab material by Dr. Mai Elshehaly

Let’s play Candy Crush https://king.com/play/candycrush Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Candy Crush Rules Whenever three or more candies of the same color form either a horizontal line or a vertical line, the following happens: The player gains points The candies are removed from the grid thereby creating holes in the game field The candies on top of the removed candies move down thereby filling the holes New random candies are added from the top to fill the open slots on the board. Lab material by Dr. Mai Elshehaly

Step 1: Download the Skeleton Code Option 1: from Dropbpx: https://www.dropbox.com/s/z3554ulg3tgorxi/candycrush- skeleton.zip?dl=0 Option 2: http://web.mit.edu/6.813/www/sp17/assignments/ps1- candycrush-ui/candycrush-skeleton.zip Lab material by Dr. Mai Elshehaly

Step 2: Familiarize yourself with structure The folder contains: index.html: a skeleton file for your user interface. Start coding here. mainLayout.css: a stylesheet file for index.html board.js: a javascript file containing the Board class rules.js: a javascript file containing the Rules class candy.js: a javascript file containing the Candy class graphics: a folder containing all the graphics files (we will use them layer) Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly What we see now Lab material by Dr. Mai Elshehaly

By the end of this week, it should look like this: Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly What we want to do The first column should contain two elements: The game title (bold and colored) A New Game button The buttons should be <input> elements. Lab material by Dr. Mai Elshehaly

The <p> tag ( p for paragraph) You can now start working in files in the game skeleton Add this in index.html Lab material by Dr. Mai Elshehaly

Your text needs some styling Lab material by Dr. Mai Elshehaly

Add line break between the two words <br> Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Add font style Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Adding a button Lab material by Dr. Mai Elshehaly

Click on the button in your web browser Nothing happens! Lab material by Dr. Mai Elshehaly

What you’ll learn in this lab Web GUI framework HTML tags and attributes <div> elements CSS layout Understand what is being given to us in the code skeleton Understand what is the target outcome of this assignment <input> element Adding functionality with JavaScript Lab material by Dr. Mai Elshehaly

Javascript A programming language Run in web browsers Allows web pages to perform tasks such as: reading elements from the DOM, add elements to the DOM, manipulate or move elements of the DOM, react to events (e.g. mouse clicks), determine the user’s screen size, date and time, etc.

Javascript Adds a lot of functionality to web pages Mainly works on the GUI side But can also be used for server-side processing (e.g. Node.js)

A combination of HTML, CSS, DOM and Javascript provides an infrastructure for Web GUI development

Add onClick attribute to your <input> Lab material by Dr. Mai Elshehaly

Now let’s tell the program what the doFunction() call does Under the <script> tag, add this function definition Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly What happens Reload the page in your browser Press Ctrl+Shift+j (for Google Chrome) to see the developer console You will see the sentence “Hello World” printed to console. Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Congratulations! You just added JavaScript functionality to your page! Lab material by Dr. Mai Elshehaly

What you’ll learn in this lab Web GUI framework HTML tags and attributes <div> elements CSS layout Understand what is being given to us in the code skeleton Understand what is the target outcome of this assignment <input> element Adding functionality with JavaScript Lab material by Dr. Mai Elshehaly

Lab material by Dr. Mai Elshehaly Homework Activity Go to: https://www.w3schools.com/tags/tag_table.asp Understand the <table> HTML tag Add a 2 x 2 table to the main column in your index.html Lab material by Dr. Mai Elshehaly