Creating Internet Surveys and Collecting Data Using HTML Lecture 4, Psych 350 - R. Chris Fraley

Slides:



Advertisements
Similar presentations
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
Advertisements

HTML Basics Customizing your site using the basics of HTML.
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML – A Brief introduction Title of page This is my first homepage. This text is bold  The first tag in your HTML document is. This tag tells your browser.
Creating basic HTML web pages R. Chris Fraley |
Hypertext Markup Language. Platform: - Independent  This means it can be interpreted on any computer regardless of the hardware or operating system.
Understand Web Page Development Software Development Fundamentals LESSON 4.1.
XP Adding Hypertext Links to a Web Page. XP Objectives Create hypertext links between elements within a Web page Create hypertext links between Web pages.
CIS101 Introduction to Computing Week 05. Agenda Your questions CIS101 Survey Introduction to the Internet & HTML Online HTML Resources Using the HTML.
Web Page Development Identify elements of a Web Page Start Notepad
Introduction to HTML 2006 CIS101. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Introduction to HTML 2006 INT197B. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
HTML Introduction HTML
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Web Design is a class created to nurture the minds of high school techies, and introduce those without prior knowledge to the field.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Creating a Web Page HTML, FrontPage, Word, Composer.
Designing a Classroom Web Site Using NVU Beginning Level.
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.
Link and Table in HTML. Statistics HTML review The two faces of a HTML file In a notepad program. In a internet browser program. The function of HTML.
Creating Internet Surveys and Collecting Data Using HTML Lecture 4, Psych R. Chris Fraley
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
Creating basic HTML web questionnaires R. Chris Fraley – Psych 437.
DAT602 Database Application Development Lecture 14 HTML.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
1 Essential HTML coding By Fadi Safieddine (Week 2)
Understanding HTML Code
WELCOME EF 105 Spring EF 105 Computer Methods in Engineering Problem Solving Week 2: FrontPage Introduction to Software Use to create Web Pages.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 8 1 Creating Effective Web Pages Creating HTML Documents Tutorial 8.
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.
Overview of HTML/XHTML Two Different Approaches  Text editor like Notepad  HTML editor such as: –KompoZer –DreamWeaver –Microsoft Expression Web –iWeb.
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,
1 Creating Web Pages Part 1. 2 OVERVIEW: HTML-What is it? HyperText Markup Language, the authoring language used to create documents on the World Wide.
Introduction to web development and HTML MGMT 230 LAB.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
HTML: Hyptertext Markup Language Doman’s Sections.
CPSC 203 Introduction to Computers Lab 33 By Jie Gao.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
Tutorial 3 Adding and Formatting Text with CSS Styles.
Part 4 Processing and saving data with CGI/Perl Psychological Science on the Internet: Designing Web-Based Experiments From the Ground Up R. Chris Fraley.
HTML(Hyper Text Markup Language) ByNaveen. Introduction HTML or Hyper Text Markup Language is the standard markup language Its used to create the web.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Images. Intro What is it? Getting your image Inserting Moving Resizing Cropping.
Landscaper 101. Time Code AMC AMCNET HELP!!! Where do you go for help? –Upper right corner has a ? for the online help –This presentation.
Web Authoring with Dreamweaver. Unit Objectives  Be able to define keywords: HTML, HTTP (protocol), browser, web server, client/server, tag, attribute,
Spiderman ©Marvel Comics Creating Web Pages (part 1)
1 Committed to Shaping the Next Generation of IT Experts. 03: Links and Forms HTML.
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.
1 2/16/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Intro to HTML and Basic Web Page Design.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Tutorial #1 Using HTML to Create Web Pages. HTML, XHTML, and CSS HTML – HyperText Markup Language The tags the browser uses to define the content of the.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
1 Foundation of HTML Web Page Design. 2 Safe Web Fonts: Used by most computers regardless of environment or platform  Times New Roman  Arial  Courier.
Introduction to web design discussing which languages is used for website designing
Part 3 Creating basic HTML web pages
Part 3 Creating basic HTML web pages
Presentation transcript:

Creating Internet Surveys and Collecting Data Using HTML Lecture 4, Psych R. Chris Fraley

Goals The goal of this lecture is to explain how you create relatively simple webpages that can be used to collect data for research purposes. –We’ll be using this method for some of the research assignments and at least one major project. –Potentially complex topic; practice the methods a bit. –If you know a bit about web programming already, please follow along within our sandbox for the purposes of class assignments. Doing so will help us ensure that everyone is able to do some core things.

HTML web pages Most web pages are written in a “language” called HTML (hypertext markup language). HTML files exist on a web server. When a person types in the URL for a specific file in his or her web browser, the person is essentially retrieving that pre-existing file from the web server.

How the Process Works web user types a URL into the browser web server locates requested HTML file (or runs a script) and sends the requested HTML file (or script output) to user’s computer web user the browser renders the HTML file as a web page

HTML There are many programs that are designed to help you create HTML files –Macromedia’s Dreamweaver –Microsoft’s FrontPage –Microsoft’s Word These kinds of programs are often called WYSIWYG programs. They allow you to create web pages in the way in which you want them to appear; the HTML code is generated in the background.

EditPlus There are good reasons to learn to write your own HTML Code Editors –Mac/iOS – Text Wrangler –PC/Windows - Notepad ++ Regardless, do NOT use MS Word. Use a basic text editor (e.g., Notepad in Windows) if you do not use a program specifically for HTML coding. You can use Notepad, but you’ll need to be careful if you do. Notepad will often force the file extension to be *.txt even when you explicitly choose an alternative extension.

Let’s begin...

[Live examples of creating HTML code using TryIt Editor at ]

HTML Tags HTML web pages are based on a combination of text and tags. Tags are programming commands used to modify the contents of a web page. They are used, for example, to change the color of the text, the size of the text, insert images, etc. Example: and Most (but not all) tags have an “opening” and “closing” tag. The opening tag is used to tell the browser that a new command is coming and the closing tag tells the browser that the command is complete.

HTML Tags The most basic tag is the HTML tag. This is used so the browser will know that the content to follow is HTML code/content. (Most browsers assume this by default even without the use of the HTML tag.)

HTML Tags Any text that is placed in-between these tags will be rendered by the browser. Try this example. The purpose of this study is to learn more about personality.

HTML Tags - Bold Text can be formatted in ways that will be familiar to you if you use a program like MS Word. To set something in bold, use the tags and include the piece to be set in bold in-between. Try this example. The purpose of this experiment is to learn more about the way people understand machines.

HTML Tags - Italics Italics work in the same way. The HTML tags for setting text in italics are and Try this example. Although the average score in this sample is 4.23, your score was 6.32.

Font size and color To augment the font color or size, you can use the tags. Note: The font tag is the first of several tags we will discuss that have attributes or parameters. For example, when setting the font, you can adjust the face, the size, and the color. The examples will make this clear. Welcome to my web page!

Font size and color Another example. Psychology 350 Welcome to our class web page!

Line spacing In HTML, carriage returns are not coded as line breaks. You can use them all you wish to format your file, but the presence of a return in the code will not affect the rendering of the text. To insert a line break, you must include a tag for it. The line break tag is. There is no closing tag.

Line spacing Try this example. Psychology 350 Welcome to our class web page!

Blank Spaces Blank spaces work in a similar way: Any space (greater than 1) that exists in the HTML code will not be rendered. If you want a sequence of blank spaces (e.g., for minor indenting), you have to include them explicitly. The command is &nbsp (Notice that this is not a tag per se, but it is still an HTML command. nbsp stands for Non-Breaking Space.)

Blank spaces Try this example. Factor 1 &nbsp &nbsp joy &nbsp &nbsp happy Factor 2 &nbsp &nbsp sad &nbsp &nbsp shame

Centering Text To center text, use the and tags Try this example. Personality Research 350 The purpose of this study is to learn more about the way people understand others.

Creating Links A link is a portion of the page that, when clicked, automatically transports the user to a new page. HTML code: click here to go to Google Note: The “A” stands for “anchor”. The HREF attribute is the URL for the page you want the user to go to when the link is clicked. The text in between the two tags will be what the user sees as the link. Although there are many ways to specify the URL, the most reliable way to do so is to start with and include the FULL URL that you would see on your browser address bar (see example above).

Cascading Style Sheets (CSS) One of the cumbersome aspects of formatting text in classic HTML is the sheer number of tags required to do so. If you choose to change the “style” of your web page after a period of time, all of the code needs to be rewritten. This is especially inconvenient when working with tables because the text has to be formatted separately within each cell. CSS provides a means for separating style from content and is an efficient way to add pizzazz (not pizza) and personality to your web pages.

CSS Any text that is placed in-between these tags will be rendered by the browser. Try this example. body { color: white; background: gray; font-family: verdana; font-size: 14; line-height: 2; } Welcome to my web page!

You can define “classes” so that different portions of your content are styled differently.

CSS Adjusting the way in which links behave. a:link{ color: blue; } a:visited { color: navy; } a:active { color: pink; } a:hover { color: red; background-color: blue;} } Welcome to my web page! click here to go to Google

Images You can use tags that enable images to be displayed on your web page. Here is the basic code:

Image Attributes Notice that there are several attributes that can be varied: width, height, and alt (i.e., the text that appears when you hover your mouse over the graphic). As with links, there are many ways to specify the address for the image. The surefire way to do it for the purposes of this class is to list the full URL for the image in question. Importantly, for the purposes of this class, the image must already exist on the Internet. If there is an image on your computer, you cannot display it for others unless it is web- accessible.

Forms: How to collect data The majority of web pages exist simply to provide content. It is also possible to use web pages to collect information through the use of forms. Forms are special segments of a web page that tell the browser that information is to be collected.

[Example of a web page using a form] The live page is at: The HTML code for the page can be viewed (and copied) by “right-clicking” on the page and choosing the “view source” option in Windows or the equivalent on a Mac.

Note. The user provides input and clicks a ‘submit’ button when he or she is done.

Different input options Radio buttons Checkboxes [skipping in this class] Textboxes Select menus Textarea [Review these in depth based on the online version of testform2.htm. Right-clicking to view the code of that page contains detailed comments and explanations.]

Variable Names For the purposes of this class, it is best to use variable names that represent the order of the variables in your questionnaire. v01 v02 v03 v04 v05 … v10 v11 v12... v20 v21... I tend to use “v” (for variable) followed by a number, with a leading 0 for the first 9 items. I STRONGLY encourage you to follow this convention also.

HTML Forms The basic ingredients of an HTML form: A tag that specifies the action to be taken when the user submits the information The input fields [questionnaire items] One or more hidden tags to preserve information A submit button A closing tag

HTML Forms The form tag specifies, as part of the action attribute, the name of the script that will be activated when the submit button is pressed. For the purposes of this class, you will always be using this exact line of code for your opening form tag. Never change this; copy and paste.

Overall structure in review CSS stuff Note: This line never changes in this class –Various input fields for collecting data using radio button inputs, select menus, text responses –Hidden tag for author of survey Example: Note: This will become the filename for data file itself. Make note of it and, for continuiuty, make it the same as the name of the HTML file you’re creating. –Submit button

Transferring your web page to the web server Save your file with the *.html extension. Example: coffeefan1.html For many projects in this class, you will want to use your alias or username as the file name, with a number appended to it so that you can keep various assignments separated. Example: If your alias is “coffeefan” –coffeefan1.html –coffeefan2.html –coffeefan3.html

Transferring your web page to the web server For this week’s lab assignment (Friday), you’ll be working together in groups to create a websurvey and you will use your group assignment as your file name Examples: –group1.html –group2.html –group3.html Notice that I’m not capitalizing anything. Stick with that rule so we can be consistent as a class and not create administrative bungles.

Transferring your web page to the web server your html file as an attachment to your TA. Make sure the SUBJECT LINE of your says “Psych 350 web” The TA’s will send the files to me. I’ll upload them to the class server on Sunday. After I do so, your webpage will be “live” and anyone can access it via the Internet.

Transferring your web page to the web server The URL will be If your alias/username is “coffeefan” and you saved the file as “coffeefan1.html” then the URL for that webpage would be –

Peeking on Data We’ll discuss data exporting more next week, but, for now, if you want to see how the server is saving the responses to your questionnaire, you can do so via this link: Enter the data file name in the input field. This is the name that you stored in the “hidden tag” at the end of your form. (“coffeefan1” in the previous example.) This will show you a comma-delimited text file.