CSC 101: PreLab Reading for Lab #4 More HTML (some of this reading on Tables and Images are based on previous writings of Prof William Turkett)

Similar documents
CSC 101: Lab #2 HTML and the WWW Manual and Report Lab Date: Tuesday, 2/2/2010 Report Due Date: Friday, 2/5/2010 3:00pm

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

CSC 101: Lab #1 HTML and the WWW Lab Date: Tuesday, 1/26/2010 Report Due Date: Friday, 1/29/2010 3:00pm

Authoring World Wide Web Pages with Dreamweaver

Recitation 3 Further Work with Dreamweaver and Photoshop: Refining your Web Site

CS 103, Fall 2008 Midterm 1 Prof. Nakayama

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

CSC 101: Lab #1 Introduction and Setup Due Date: 5:00pm, day after your lab session

HTML/CSS Lesson Plans

Start by launching Mozilla To start making a web page, go to File -> New -> Composer Page

11. HTML5 and Future Web Application

HTML What is HTML Hyper Text Markup Language is a computer based language used to create WebPages.

Programming Lab 1 (JS Hwk 3) Due Thursday, April 28

Certified HTML5 Developer VS-1029

Creating Web Pages Using HTML

Perfect Student Midterm Exam March 20, 2007 Student ID: 9999 Exam: 7434 CS-081/Vickery Page 1 of 5

HTML Images - The <img> Tag and the Src Attribute

By Ryan Stevenson. Guidebook #2 HTML

Using Dreamweaver To Edit the Campus Template Version MX

Eng 110, Spring Week 03 Lab02- Dreamwaver Session

CSE 3. Marking Up with HTML. Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware

Creating Web Pages. Getting Started

ORB Education Quality Teaching Resources

Resetting Your Password

HTML Tags <A></A> <A HREF=" CNN </A> HREF

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

ADDING CSS TO YOUR HTML DOCUMENT. A FEW CSS VALUES (colour, size and the box model)

UPLOADING AN IMAGE TO FACEBOOK AND MAKING IT YOUR PROFILE PICTURE

This booklet is knowledge of. a web page. of a web page find what you. you want to. SiteSell offers. Introduction

Introduction to Computer Science (I1100) Internet. Chapter 7

ICT IGCSE Practical Revision Presentation Web Authoring

Client-server practices

HTML Exercise 24 Tables

All Creative Designs. Basic HTML for PC Tutorial Part 2 Using MS Notepad Revised Version May My First Web Page

CSC 121 Computers and Scientific Thinking

Chapter 4 Notes. Creating Tables in a Website

Using Microsoft Word. Working With Objects

UNIT 3 SECTION 1 Answer the following questions Q.1: What is an editor? editor editor Q.2: What do you understand by a web browser?

Creating a simple HTML page

1 Creating a simple HTML page

Dreamweaver MX Overview. Maintaining a Web Site

The City School. Prep Section. ICTech. 2 nd Term. PAF Chapter. Class 7. Worksheets for Intervention Classes

The City School. Prep Section. ICTech. 2 nd Term. PAF Chapter. Class 8. Worksheets for Intervention Classes

Web browsers. 1. Google Chrome - 62% 2. Mozilla Firefox - 15% 3. Internet Explorer - 10% 4. Safari - 5 % 5. Microsoft Edge - 4% 6.

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

FCKEditor v1.0 Basic Formatting Create Links Insert Tables

LESSON 3. Coding Tables Continued

Using Adobe Contribute 4 A guide for new website authors

Chapter 11: Going All Out with FrontPage

ADOBE DREAMWEAVER CS4 BASICS

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

Chapter 4: Marking Up With HTML: A Hypertext tmarkup Language Primer

Attributes & Images 1 Create a new webpage

Tables *Note: Nothing in Volcano!*

Marking Up with HTML. Tags for Bold, Italic, and underline. An HTML Web Page File. Chapter 4: Marking Up With HTML: A. Formatting with Tags:

FRONTPAGE STEP BY STEP GUIDE

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

Lab 3. CSE 3, Summer 2010 In this lab you will learn and implement some basic html.

Joomla! 2.5.x Training Manual

JS Lab 1: (Due Thurs, April 27)

Cascading style sheets

HTML Exercise 20 Linking Pictures To Other Documents Or Web Sites

LAB 3 CSE 3, Spring 2018 In this lab you will learn and implement some basic html.

1.0 Overview For content management, Joomla divides into some basic components: the Article

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

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

Creating Classroom Websites Using Contribute By Macromedia

THE HITCHHIKERS GUIDE TO HTML

CS Multimedia and Communications REMEMBER TO BRING YOUR MEMORY STICK TO EVERY LAB!

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

TinyMCE Users Guide. This user manual will show you all the basics of the TinyMCE editor.

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

HTML = hyper text markup language

LESSON LEARNING TARGETS

What You Will Learn Today

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

16B. Laboratory. Linking & Images in HTML. Objectives. References

Hyper Text Markup Language HTML: A Tutorial

ITNP43: HTML Lecture 3

Creating A Web Page. Computer Concepts I and II. Sue Norris

Step 4 Part F - How to Download a Video on YouTube and Delete a Video

Table Basics. The structure of an table

HTMLnotesS15.notebook. January 25, 2015

Google Earth: Significant Places in Your Life Got Maps? Workshop June 17, 2013

CIS 228 (Spring, 2012) Final, 5/17/12

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

c122jan2714.notebook January 27, 2014

Chapter 4 Creating Tables in a Web Site Using an External Style Sheet

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

Basic Computer Skills: An Overview

CSC Web Programming. Introduction to HTML

NVU Web Authoring System

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

***OPEN IMODULES IN CHROME*** 1) Choose Home:

FIT 100 LAB Activity 3: Constructing HTML Documents

Structure Bars. Tag Bar

Website Creating Content

The Official E-Portfolio Tutorial Guide

University of Pittsburgh Communications Services. Basic Training Manual Drupal 7

THE ASIAN SCHOOL. Class-10. ch8. A. Check the Right Answer (1*9)

Transcription:

CSC 101: PreLab Reading for Lab #4 More HTML (some of this reading on Tables and Images are based on previous writings of Prof William Turkett) Purpose: The purpose of this pre-lab is to provide you with additional background material on the HTML language and the interaction of web browsers and web servers. You will work with additional HTML examples. Introduction: Last week you were introduced to some of the fundamental HTML tags, including tags that define the general structure of an HTML document, text formatting, paragraphs, lists, and, importantly, links. In this week s lab, images and tables will be introduced, as well as the idea of relative and absolute pathnames (paths). Although you already saw those last week, we did not use those terms. Further, we will look at how the computer stores colors and a way to create our own google maps. Helpful Hints: Type URLs instead of cut and pasting links from this PDF or from the browser address bar into your HTML source code. The quote ( ) symbols do not always get copied correctly and can cause problems. Make sure that when you set a value for any property (one example being setting href= SOMETHING ), you include quotes on both ends of the value you are assigning to the property. Images: As you are aware from your experiences in using the World Wide Web, it is possible to include images in web pages. The tag for images is a single, self-closing tags (similar to <hr /> from last week) inserted at the spot where an image is desired. The tag that is used to insert an image at a particular spot is: <img />. Notice that such a tag doesn t tell us much just that an image is going to be included. We need to add to this tag the source of the image. In HTML, the property is called src and the value given to it should be a URL where the desired image can be found. An example of setting the image src property is below: <img src= http://www.cs.wfu.edu/newpics/3.jpg /> The size of digital images is defined in units of pixels (picture elements). For example, an image may be 480 pixels across (its width) and 640 pixels tall (its height). It is possible to change the displayed height and width of an image through HTML. Note this doesn t change the actual size of the image, but just how the browser displays the image. To vary the height and width of an image, within the img tag set two additional properties: height and width. As an example, to display a 480x640 image at half-width and half-height, use width= 240 and height= 320. <img src= http://www.cs.wfu.edu/newpics/3.jpg width= 240 height= 320 />

The 480x640 size above was just a size pulled out of the air. If working with images in a webpage, it helps to know the size of the image being worked on. One quick way to determine the size of an image that is located on your hard drive is to drag it into an open Google Chrome or Mozilla Firefox web browser window. The size will appear on the title/tab bar. In the example at right, the image TryViolin.jpg is shown to be 420 pixels wide and 276 pixels tall. Putting all of the above information together, here is an example using image tags. First, using the image above, we see HTML code that shows the image at full size, and then with new width (200) and height (75). Note that the image has been stretched (in technical terms, the aspect ratio was not maintained) In order to have our images look nice, we should be careful to scale the width and height in the same proportions. Tables: Tabular information can be represented in HTML using three main sets of tags. The content that goes into a table should first be surrounded by <table> and </table> start and end tags. Tables are specified in row-column format, so within the <table></table> tags, first indicate you want a row, using <tr> and </tr> to mark the beginning and end of a row within the table. The tr stands for table row.

Finally, within a row, surround the data to go into each column with <td> and </td> tags. The td stands for table data. With these tags, one can build very simple tables. An example table and its corresponding HTML are shown on the next page. To improve the look of the table, use a few additional tags: The <caption> and </caption> tags allow for a title to be added above the top of the table. A row of table headings can be added in the first row of the table by using <th> and </th> tags instead of <td> and </td> tags in that row. Table headings will be formatted to stand out, with respect to formatting, relative to the rest of the table. In addition, three properties can have values assigned within the <table> tag: border Assigning this property a whole number (integer) value will put a border around the table. A value of 0 means no border, and the border size increases as the value increases. cellspacing Assigning this property an integer value sets space between individual table cells (betwen the <td></td> entries). You can think of this as the size of the cell wall. cellpadding Assigning this property an integer value sets the space between the content of the cell and the cell wall.

Here is the previous example table, but now built using the tags and properties specified above: Links: Absolute vs. Relative Paths: On your laptop s hard disk you have files stored in folders (folders are also called directories). Each file and folder can be specified by using a unique absolute path to the file. The absolute path to a folder or a file is the list of all of the parent folders followed by the name of the file or folder of interest. As an example, the file page1.html in the image below has an absolute path of: C:\Users\WFUT4002009\Documents\CSC101Lab\lab2\page1.html (all of the parent folder names are highlighted in blue below, and then we attach the name of the file of interest). Notice that this absolute path starts all the way back at the C:\ folder, which is as far back as you can go when talking about files and where they can be saved. An absolute path could also start at D:\ (which is a different disk available on some computers).

Webservers also make use of absolute paths. Instead of just being a list of folders, web server absolute paths are as follows: http://webserver_name/folders/folders/folders/filename.html Notice they include the additional http:// and the name of the webserver. Using absolute paths is sometimes very important. What if we have two files named the same thing on our hard drive? Two files named the same is OK, given that they have unique absolute paths (which means, as long as they sit inside of different folders, as providing the list of folders will make them unique). It is often convenient to refer to a file or folder or webpage using a relative path that is, specifying the location of a file relative to your current location on a drive. In last week s lab, you created a hyperlink in your main.html file to your page1.html file. The hyperlink looked like this: <a href="page1.html">page 1</a>. Notice that the hyper-reference (the href) simply refers to page1.html instead of a long absolute path to page1.html. Using just the name page1.html essentially says: since main.html didn t give you any extra addressing information in its link to page1.html, just expect page1.html to be in the same folder as main.html. You might have considered using an absolute path instead to page1.html, using a link like this: <a href="c:\users\wfut4002009\documents\csc101lab\lab2\page1.html">page 1</a> but that s not the best idea. The absolute path above is a very precise and complete description of how to get to page1.html, telling someone how to get to the file starting from the the C:\ drive folder. This absolute path probably would have worked OK while you were working on your laptop s copy of the files. However, when you copied your files and folders to the WFU webserver, this absolute path would have no longer have worked as it explicitly refers to your laptop s C:\ drive, which the web server computer doesn t know about. On webservers like wfu.edu it s always a good idea to use relative paths when you are linking to other files that are part of your own personal website and absolute paths when linking to another website.

Colors: The computer represents a particular color via something called RGB. This is short for Red, Green, and Blue values. In grade school, we learn that red, yellow, and blue are the primary colors (and hence the first three crayons in the box). However, what we learned applied to pigments (and hence the physical crayons). For light, the primary colors are red, green, and blue. Thus, to create other colors, we must mix them. Take a glance at what Wikipedia has to say about RGB. http://en.wikipedia.org/wiki/rgb_color_model In particular, look at the following sections (available as of September 22): Opening section Additive Primary Colors Numeric Representations Colors in web-page design image copied from Wikipedia From the image above, we can see the metaphor of turning on three flashlights - one of red light, one of green light, and one of blue light. As two or more colors overlap, a different color is formed. Note from the picture that: all three colors overlapping creates white (viewed as all possible light) having no colored light produces black What the picture is unable to show is how to produce a wide variety of colors. Different colors than those shown are achieved by "turning up" or "turning down" the lights. If we have white, and then "turn down" all three lights (reduce the intensity of each), we will get off-white. The more we turn down the lights, the "dirtier" the white becomes. To see more about this, you can look at various websites, including (as of September 22): http://cloford.com/resources/colours/500col.htm http://kb.iu.edu/data/aetf.html We will be experimenting with these colors in lab. Web servers generating content for you: (Batch geo-code example) There are many websites that allow you to upload data so that the website will generate web content for you. In this section, we will look at one example: batch geo-coding. Batch geo-coding is loosely defined as taking a set of geographic information, pulling it together in one map, and linking that information with other non-geographical content (eg. phone numbers, web sites, etc). We will be doing something like this in lab. The basic steps will be: - Type in the relevant information (geographic and otherwise) into a spreadsheet.

- Paste the data to a web site. - See the result. - Have the website email you HTML code. - Copy that HTML into Notepad. - Publish your website.