Introduction to Programming the WWW I CMSC 10100-1 Winter 2004 Lecture 2.

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

Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
Unit 3 Day 4 FOCS – Web Design. No Journal Entry.
Chapter 2 HTML Basics Key Concepts
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
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
Web Page Development Identify elements of a Web Page Start Notepad
Creating a Web Page HyperText Markup Language. HTML Documents  Created using any text editor  Notepad  Vi, Pico, or Emacs  If using word-processor,
HTML Introduction HTML
Database-Driven Web Sites, Second Edition1 Chapter 2 INTRODUCTION TO HTML.
Developing a Basic Web Page with HTML
HTML: PART ONE. Creating an HTML Document  It is a good idea to plan out a web page before you start coding  Draw a planning sketch or create a sample.
Hypertext Markup Language (HTML) Created by Sarah Dooley & Amanda Foster Edited and presented by Caroline Hallam September 9, 2014.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Internet Skills An Introduction to HTML Alan Noble Room 504 Tel: (44562 internal)
Unit 1 – Developing a Web Page. Objectives:  Learn the history of the Web and HTML  Describe HTML standards and specifications  Understand HTML elements.
INTRODUCTION TO DREAMWEAVER 8. What we already know…  Design basics  Contrast  Repetition  Alignment  Repetition  HTML.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 3.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Understanding HTML Code
1.  Describe the anatomy of a web page  Format the body of a web page with block-level elements including headings, paragraphs, lists, and blockquotes.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 3.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
HTML Hyper Text Markup Language A simple introduction.
A Basic Web Page. Chapter 2 Objectives HTML tags and elements Create a simple Web Page XHTML Line breaks and Paragraph divisions Basic HTML elements.
HTML,DHTML & Javascript/Session1/1 of 39 Introduction and Basic Tags Session 1 of Using HTML, DHTML & JavaScript.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
1 John Magee 9 November 2012 CS120 Lecture 17: The World Wide Web and HTML Web Publishing.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 2.
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 
College of Micronesia- FSM Pohnpei State Campus GEORGE S. MANGONON, MBA Chair, Math/Sci Division September 15-25, 2008.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Chapter 2 Web Page Design Mr. Gironda. Elements of a Web Page These are things that most web pages use.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 3.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 2 and 3 Scott Marino.
HTML Introduction. Lecture 7 What we will cover…  Understanding the first html code…  Tags o two-sided tags o one-sided tags  Block level elements.
Formatting Text with HTML. Objectives: Students will be able to: Define the structure of the document with block elements Format numbered, bulleted, and.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
1 Lecture 12 Lecture 12 Basic HTML ITEC 1000 “Introduction to Information Technology”
HTML, Third Edition--Illustrated Brief 1 HTML, Third Edition Illustrated Brief Unit C Formatting Page Elements with HTML.
Landscaper 101. Time Code AMC AMCNET HELP!!! Where do you go for help? –Upper right corner has a ? for the online help –This presentation.
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.
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
Building a Website: Layout Fall Overall Structure: Home Page Title Section Title Frame Picture UNCP Math Menu Content Footer Contact Information.
Chapter 4 and 5. Objectives Introduce markup: elements and attributes How browsers interpret HTML documents Basic structure of HTML document What do style.
NOTEPAD++ Lab 1 1 Riham ALSmari. Why Notepad++ ?  Syntax highlighting  Tabbed document interface  Zooming  Indentation code  Find and replace over.
Text Elements. We've already learned about the,,,, and elements. Now let's learn some elements that we'll use to present actual text content on our web.
HTML Introduction. Lecture 7 What we will cover…  Understanding the first html code…  Tags o two-sided tags o one-sided tags  Block level elements.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Getting Started With HTML
HTML Basics.
CS7026: Authoring for Digital Media HTML Authoring
LAB Work 01 MBA 61062: E-Commerce
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Creating and Editing a Web Page
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

Introduction to Programming the WWW I CMSC Winter 2004 Lecture 2

2 Today’s Topics Some basic HTML tags:  Headings, horizontal rules, paragraphs, line breaks, comments, fonts, lists Some basic technologies  Text editors  Basic Linux commands  Remote login and file transfer

3 Notice TA hours posted on course web Lecture notes subject to change Check online homework before due date HW1 “plain HTML” means no attribute for HTML elements

4 Review: HTML Elements HTML elements are blocks of text with special syntax Every element consists of tags and content  Start tag and end tag Elements may be nested

5 Review: HTML TagTemplate (insert text for the browser’s title bar here) (insert visible Web page elements here)

6 Block-level Elements vs. Inline Elements To classify elements appearing in body element  distinction based on content model and formatting Block-level elements  Contain inline elements and other block-level elements  Begin on a new line when rendered  Ref: HTML 4.0 block-level elementsHTML 4.0 block-level elements Inline elements  Contain texts and other inline elements  Don’t begin on a new line when rendered  Ref: HTML 4.0 Inline elementsHTML 4.0 Inline elements

7 Web Page Structure

8 Division Element A block-level element to defines a block of content in the page  Used in conjunction with ALIGN attribute to format the content Discuss later in CSS Example:  div.html div.html  div1.html div1.html

9 Headings Headings are used to indicate structure for a document by providing titles or descriptions of the material following There are six levels of heading tags, denoted through  Look at: allheadings.htmlallheadings.html  Note some browser-dependence Example:  headsample1.html headsample1.html  headsample2.html (alignment attribute) headsample2.html

10 Paragraph Elements Headings break up sections of documents Each section can be broken into more than one paragraph by the tag Paragraphs have the align attribute: “left”,“center”,“right” E.g.: paragraphsample1.htmlparagraphsample1.html

11 A note In our first Web page ( helloworld.html ), we just had text sitting inside but not inside a paragraph helloworld.html In paragraphsample1.html, we put all the text inside tags paragraphsample1.html This is preferable:  Conforms to “strict” rules  Makes adding formatting easier later

12 Block quotes defines a block quotation  Sets off a quotation, important note, etc  Usually renders text as an indented block May contain block-level elements( ) but may not be contained within a paragraph Example:  blockquote.html blockquote.html

13 Preformatted text Renders with line breaks corresponding to source file  Useful for putting in “visual” poetry or computer code Typically appears in a monospaced font Usage: Example:  Preexample1.html Preexample1.html  Same code without Same code without

14 Line breaks Browsers automatically wrap text You can force the end a line without ending a paragraph by using This is a stand-alone tag  XHTML specifies we must use to indicate that the tag closes itself (prevents parser from looking for “other” tag XHTML Example: linebreak.htmllinebreak.html

15 Horizontal rules Specified by the tag Attributes and values:  align = “left”, “right”, “center”  noshade (turns off 3d effect)  size = “n” (thickness, in pixels)  width = “n” or “n%” Example: horrule.htmlhorrule.html

16 Lists Three kinds of lists:  Ordered  Unordered  Definition lists Frequently used in Web programming  Sets out big ideas  Table of contents  List of links

17 Ordered lists Used to specify a sequence of things  top-ten list  set of instructions  outline Begun and ended with Each element in the list is Example:  Orderedlist1.html Orderedlist1.html

18 Attributes for ordered lists We can set two attributes  The type of symbols used Arabic numerals (type=1, default) capital or lower case letters (type=A or type=a) capital or lower case Roman numerals (type=I or type=i)  The start value Example:  Orderedlist2.html Orderedlist2.html Note: these attributes can be controlled better through CSS

19 Unordered lists Used for more general collection of items  list of links  ingredients for a recipe rather than instructions Attribute type could be: disc, circle, square Example  unorderedlist.html unorderedlist.html

20 Definition lists Not just for definitions Can be for longer descriptions, etc Uses tag to begin and end list Rather than using to denote list items, has terms and definitions  Example: definitionlist.htmldefinitionlist.html

21 Nested List Lists can be nested within other lists  The indent from the left is cumulative, however.  The deeper you go, the thinner the indent margin will become. Example: nestlist.htmlnestlist.html

22 HTML comments Comments are specified by the syntax The browser ignores what’s inside Helps you describe what you’re trying to accomplish to people reading the source Also can hide items from old browsers Example: comment.htmlcomment.html

23 How to edit your Web pages? Path1: Work on your own computer  First edit/revise Web pages locally (networking not required)  Then transfer files onto the server via some remote file transfer tool (networking required) Path2: Work directly on the server  Either go to the Mac Lab in Regenstein and log on to one of the machines  Or log on to the server from home via some remote access tool

24 Text editors Text editors if working on your own Mac/Windows machine  Windows Notepad  Mac OS9 SimpleText (or OSX in Classic)  Mac OSX TextEdit Text editor if working directly on Linux server  emacs, vi, pico, etc

25 Using Win/Mac text editors Windows, Mac OS9 are easy - just type in the html, save as myfile.html, and view TextEdit for OSX is a little fussier Go to TextEdit-->Preferences … Select New Document Attributes --> Plain text radio button Deselect Saving --> “append.txt extension” check box

26 Introduction to Linux Not so easy to begin learning as Win/Mac Very useful in networking, Web servers We’ll cover some basics  directory structure and navigation  copying, deleting files  permissions  getting files from home or lab to the right place on the network

27 Directories Much like folders in Win/Mac. You home directory is referred as ~  E.g.: My home directory is ~hai and it is short for /home/hai or something like that (depends on the system) When you log in, you are in your home directory

28 Basic directory commands The command ls tells you what is in the current directory The command pwd tells you what directory you are in The command cd followed by a directory name changes your current directory  cd.. goes “up” one directory in the tree  cd takes you “home”

29 Creating directories All your homework will be turned in to ~ /html/hw, where x is the no of the assignment. From your home directory, type in  mkdir html (creates the html directory)  cd html (changes to the html directory)  mkdir hw1  cd hw1 You are now “in” the directory for your first homework assignment

30 Using a Linux Editor Some popular editors: emacs, vi, pico, etc Example of using pico  In command line, type pico  Type in the codes of the html file  Type control-o and then a file name to save to a file  Type control-x to exit  Check other pico commands online Here is a list Here

31 Copying and deleting files The commands cp and rm copy and delete files  cp path must be specified for filenames default is current directory e.g. cp foo.html foo_bak.html  rm

32 File permissions Type in ls -l  This pulls up a listing with more information  You should see something like:  The letters on the left are the permissions of each file  More about ls command ls drwxr-xr-x 2 hai student 512 May 12 15:48 tcltklib/ drwxr-xr-x 2 hai student 512 Jan 16 13:32 temp/ -rw-r--r-- 1 hai student 12 Oct test.in

33 Permissions cont’d. This information tells who can  read  write  execute The first entry is d or - (is it a directory?) The others list the permissions for  you (the owner)  your “group”  the “world” (everybody else)

34 Reading the permissions Columns 2 through 4 are for you Columns 5 through 7 are for your group Columns 8 through 10 are for the world A letter means you have that permission A dash means you don’t Examples:  -rw-r--r--  drwxr-xr-x

35 Some information Directories must be executable and readable to be entered You must have world read permissions set  for the grader to grade  for the world to browse

36 How do I set permissions? Use the command: chmod Where is a three digit number encoding the new permissions  The first digit is for you, the second for your group, and the third for the world

37 What are the numbers? Each number is 0 through 7 that is sum of three  read: 4  write: 2  execute: 1 Some important numbers:  7: read, write, execute  6: read, write, not execute  5: read, execute, but not write  4: read but neither execute nor write  0: neither read, write, nor execute

38 Examples chmod 644 myfile.html  Allows you to read and write and the world to read but not write  Use this for all your Web pages chmod 755 html  Do this from your home directory  Allows you to read, write, execute  Allows everyone else to enter, read but not write  Use this for all your homework directories

39 Another example chmod 600 myfile.html  Gives you read, write  Shuts off file to the world

40 Remote login and file transfer If you are not directly using the CS Linux machines, you may need two things:  An SSH program (not Telnet) for logging in remotely  A secure file transfer program (not FTP) for transferring files These protocols are more secure than Telnet and FTP (and required by CS dept.) These tools can be freely downloaded Department’s login hosts

41 For Windows SSH programs:  SSH Secure Shell Client SSH Secure Shell Client  PuTTY PuTTY Secure file transfer programs:  Secure File Transfer Client Secure File Transfer Client  WinSCP WinSCP Other resource 

42 For MacOS X Darwin comes with command line ssh, scp already installed:  A SSH program for MacOS e.g.: ssh union.cs.uchicago.edu  scp : : A secure file transfer program for MacOS Can move files either direction If is the present machine, : can be omitted e.g.: scp ~/Documents/hello.html

43 For MacOS X (cont’d) Commands can be done through the Terminal which can be found at Applications/Utilities You can also use MacSFTP/MacSSH located in Applications/Internet Mac text editor SimpleText can be found at Applications/TextEditing