Fundamentals: Client/Server

Similar documents
Announcements. Paper due this Wednesday

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

Chapter 3 Style Sheets: CSS

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

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

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

7300 Warden Avenue, Suite 503 Markham, Ontario Canada L3R 9Z6. Phone: Toll Free: Fax:

introduction to XHTML

Co. Louth VEC & Co. Monaghan VEC. Programme Module for. Web Authoring. leading to. Level 5 FETAC. Web Authoring 5N1910

Reading 2.2 Cascading Style Sheets

CSS: Cascading Style Sheets

Web Publishing Basics I

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

CSS: The Basics CISC 282 September 20, 2014

CMPT 165 Advanced XHTML & CSS Part 3

CSC 121 Computers and Scientific Thinking

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

Basic Web Pages with XHTML (and a bit of CSS) CSE 190 M (Web Programming), Spring 2008 University of Washington Reading: Chapter 1, sections

Introduction to using HTML to design webpages

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

INTRODUCTION TO HTML5! HTML5 Page Structure!

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

c122jan2714.notebook January 27, 2014

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

A Brief Introduction to HTML

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

FUNDAMENTALS OF WEB DESIGN (46)

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

Lab 4 CSS CISC1600, Spring 2012

HTML TUTORIAL ONE. Understanding What XHTML is Not

Ministry of Higher Education and Scientific Research

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

A Balanced Introduction to Computer Science, 3/E

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

8a. Cascading Style Sheet

11. HTML5 and Future Web Application

1.264 Lecture 12. HTML Introduction to FrontPage

Website Development with HTML5, CSS and Bootstrap

Programmazione Web a.a. 2017/2018 HTML5

HTML and CSS COURSE SYLLABUS

Setting a Background Image

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Class 3 Page 1. Using DW tools to learn CSS. Intro to Web Design using Dreamweaver (VBUS 010) Instructor: Robert Lee

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

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

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Deccansoft Software Services

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

CSS Selectors. element selectors. .class selectors. #id selectors

ID1354 Internet Applications

BIM222 Internet Programming

CSS for Styling CS380

Study Guide 2 - HTML and CSS - Chap. 6,8,10,11,12 Name - Alexia Bernardo

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

GIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.

Certified HTML5 Developer VS-1029

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

Web Design and Development Tutorial 03

Shane Gellerman 10/17/11 LIS488 Assignment 3

Appendix D CSS Properties and Values

CSS. Lecture 16 COMPSCI 111/111G SS 2018

Exam Format: Multiple Choice, True/False, Short Answer (3 points each 75 points total) Write-the-page (25 points)

What is XHTML? XHTML is the language used to create and organize a web page:

Chapter 4. Introduction to XHTML: Part 1

How the Internet Works

CSS.

Html basics Course Outline

CSS Lecture 16 COMPSCI 111/111G SS 2018

GIMP WEB 2.0 MENUS. Web 2.0 Menus: Horizontal Navigation Bar

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

Hyper Text Markup Language HTML: A Tutorial

HTML & CSS. SWE 432, Fall 2017 Design and Implementation of Software for the Web

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

HTML Overview. With an emphasis on XHTML

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

The [HTML] Element p. 61 The [HEAD] Element p. 62 The [TITLE] Element p. 63 The [BODY] Element p. 66 HTML Elements p. 66 Core Attributes p.

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

COMP519 Web Programming Lecture 6: Cascading Style Sheets: Part 2 Handouts

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Outline. Link HTML With Style Sheets &6&7XWRULDO &66 ;+70/ (GZDUG;LD

HyperText Markup Language (HTML)

Review Question 1. Which tag is used to create a link to another page? 1. <p> 2. <li> 3. <a> 4. <em>

Controlling Appearance the Old Way

Web Development IB PRECISION EXAMS

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

Beginning HTML. A tag is a command written between angle brackets (the less than and greater than symbols). Ex. <html>

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

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

CSS. Selectors & Measurments. Copyright DevelopIntelligence LLC

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

Cascading Style Sheet

HTML. Hypertext Markup Language. Code used to create web pages

CSS Cascading Style Sheets

Wireframe :: tistory wireframe tistory.

Introduction to Cascading Style Sheets

Transcription:

Announcements Class Web Site: http://www.cs.umd.edu/projects/passport/classes/summer2008/ You can find this link at the end of the main passport site http://www.cs.umd.edu/projects/passport/webpage/ E-mail Account Get your own e-mail account if you don t have one Announcements section in web site Rules regarding Forum Use Academic Integrity Reminder to your parents Be on time Slides Carpooling 1

Fundamentals: Client/Server Client and server are two terms frequently used Client/Server Model Client/Server model when talking about software Client/Server model when talking about hardware 2

Fundamentals: IP Addresses IP Address - Unique address for machine on internet Get from ISP when connecting to internet Allows network to find your machine Format 32-bit unsigned integer 128.8.128.8 Domain Name Text name corresponding to the numeric IP address Example: wikipedia.org Name and address for local machine localhost 127.0.0.1 Running out of 32-bit IP addresses 3

Fundamentals: Web Server Web Server computer program that delivers (serves up) web pages. It is like a person that is in charge of a warehouse Four popular Web Server Programs Apache - http://www.apache.org/ IIS Internet Information Services Sun Java System Web Server Web server statistics http://survey.netcraft.com/reports/0612/ Some web server statistics (by domain) http://survey.netcraft.com/reports/0612/bydomain/com/ http://survey.netcraft.com/reports/0612/bydomain/mil/ 4

Fundamentals: DNS DNS Domain Name Systems Protocol for translating domain names to IP addresses Example: cs.umd.edu 128.8.128.44 Multiple DNS servers on internet DNS server may need to query other DNS servers edu DNS server queries umd.edu server to find cs.umd.edu 5

Fundamentals: URLs URL Uniform Resource Locators Represent web resources Arbitrary files Web pages Examples http://www.cs.umd.edu/index.html ftp://www.cs.umd.edu/pub/doc/policies.pdf https://login.yahoo.com/ file://dir/my.txt 6

Fundamentals: URL Structure URL consists of Protocol http ftp https (secure http) file IP address (or domain name) Port (optional most of the time) http://www.cs.umd.edu:80/ path 7

Firefox Browser we will use http://www.mozilla.com/en-us/firefox/?from=getfirefox Extensions we would like to have Error Console 8

HTML Language used to define web pages What the server sends to the browser Browser reads HTML and renders the page May require downloading data from server (e.g., images) 9

HTTP Hypertext Transfer Protocol (HTTP) protocol that defines how user agents (e.g., browser) and web server can communicate HTTP is a request/response protocol between clients and servers Some methods (operations) defined as part of the protocol GET Use to download a resource (e.g., image, web page). Most common method used. HEAD Returns only the header POST Submits data (e.g., form data) to the server Do not confuse with HTML Demo 10

Creating Web Pages HTML - Hypertext Markup Language HTML Standard Developed by the World Wide Web Consortium (W3C) http://www.w3.org Latest version HTML 4.01 Document is described through a series of commands and directives present in a text file. HTML goal is to describe structure only. Presentation should be left to cascading style sheets. When interpreted by an HTML viewer, those commands determine the appearance of the page HTML documents are entirely ASCII text Commands are explicitly inserted Great HTML/CSS tutorial site: http://www.htmldog.com/ 11

HTML Three versions of HTML HMTL 4.01 Strict (excludes deprecated tags and attributes) HTML 4.01 Transitional (less restrictive including appearance elements) HTML 4.01 Frameset (identical to transitional but allows <body> to be replaced with <frameset>) Web Standards Project (www.webstandards.org) Industry watchdog convincing web browsers developers to adhere to web standards. HTML 4.01 is the last version for HTML. Next version is XHTML 1.0 XHTML Uses same tags as HTML 4.01 Enforces rules like closing tags, tags in lowercase, and others. We will use XHTML in this class 12

Validation You can use W3C Markup Validation Service (http://validator.w3.org/) to validate your html. Also through firefox you can use tidy for html validation. Tidy also provides suggestions for code that cannot be validated. 13

HTML Tags Tag specifies a command or directive. It surrounds content and apply meaning to that content General format: <elementname attributes> Most HTML elements have two tags: start tag and end tag Example: <h1> text </h1> Tags and attributes will be in lowercase (XHTML requirement) Some tags are self-closed (ending them in />) <hr /> <br /> <meta /> <img /> 14

Attributes An attribute extends or modify a tag Attributes Only appear in the start tag You can have several attributes in one tag each separated by spaces Order is immaterial Some take values which are specified after an = General format <ELEM ATTR= attrvalue >Displayed Text</ELEM> Example <img src="bear.gif" width="100" height="75" alt="bear image" /> All attribute values will be enclosed in for XHTML compliance. 15

NestedTags/Spaces/Comments Nested tags are possible but don t overlap sets of them. Avoid the following: <i><b>message</i></b> Browser Processing Multiple spaces are converted to one space John Mary Peter John Mary Peter Line returns are ignored Unrecognized tags are ignored Comments Represented by <!-- --> Note: (two sets of double -) Examples <!--The html code example starts at this point--> Comments can not be nested 16

HTML Basic Skeleton An html document has two main parts. Header provides information about the document Body contents of the page Example 1 (htmldoc1.html) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>template</title> </head> <body> <!--HTML CODE HERE--> </body> </html> Let s validate the above document 17

How to Develop HTML Documents Text Editor Any text editor (e.g., wordpad, notepad, pico, etc.) HTML Editors Utilities designed to write HTML Examples: CoffeeCup HTML Editor, HTMLjive Authoring tools Frontpage Good for beginners Dreamweaver Fairly complex but powerful NVU Free and available for (Windows, Linux, Mac) List of editors can be found at: http://dir.yahoo.com/computers_and_internet/software/internet/w orld_wide_web/html_editors/ Recommended: Komodo Edit - http://www.activestate.com/store/productdetail.aspx?prdguid=20f4ed15-6684- 4118-a78b-d37ff4058c5f PHP Designer - http://www.mpsoftware.dk/phpdesigner.php 18

Frequently Used Tags <head> </head> It does not generate displayed contents Contains other tags (e.g., <title> </title> <title> </title> Part of the header It is required Search engines depend on it, so use meaningful titles 19

Frequently Used Tags Heading tags <h1> text </h1> <h2> text </h2> and so on until <h6> text </h6> Higher numbers imply smaller headers Paragraph tag <p> paragraph </p> Code Use to define computer code <code> </code> Horizontal Line - <hr /> 20

Frequently Used Tags Emphasis <em> text here </em> Text usually rendered in italics <strong> text here </strong> Text usually rendered in bold Super/Sub script <sub> text here </sub> <sup> text here </sup> Quotations <q> quote here </q> Line Breaks <br /> Verbatim (text displayed exactly as it appears) <pre> text here </pre> Example: HtmlDoc.html 21

Lists Unordered lists <ul> </ul> tags to represent beginning and end <li> </li> to represent elements in the list Example: Lists.html Ordered lists <ol> </ol> tags to mark beginning and end <li> </li> to represent elements in the list Definition lists Consist of terms and definitions like in a glossary Tags - <dl> </dl> Terms specified using <dt> </dt> and definitions with <dd> </dd> Example: DefNestedLists.html Nested lists (See previous example) 22

Image Inclusion We can include an image using the img tag <img src="testudo.jpg" alt="testudos' image" /> Example: Image.html Although the width and height attributes are not required they are highly recommended. (They can also be set through CSS). 23

Links Link connection between web resources Hypertext links are created using the <a> (anchor) tag The link can be text : <a href="http://www.cnn.com">cnn Web Page</a> Notice that you need to specify the protocol (http://) Example: Link.html The URL can be absolute or relative The link can be an image: <a href="http://www.umd.edu"><img src="testudo.jpg" alt="testudos' image" /></a> 24

Tables To define a table we use the <table> tag Border attribute controls table s border By default borders are not visible The following tags are associated with tables <tr> - defines a row <td> - defines a data element <th> - define a header data element <caption> - provides a caption for the table Must appear after the <table> tag Must be used only once Example: Table.html 25

Character Entity References Special Characters can be specified by Name specification - &name Numeric specification - &#xxx Commonly used characters Copyright Registered Trademark & & < < < > Non break space Example: CharacterReferences.html Complete list at: http://www.w3.org/tr/html4/sgml/entities.html 26

Block Elements/Inline Elements Comparison Block elements begin on new lines whereas inline elements don t Block elements create larger structures (allow you to define the large structure of your document) whereas inline elements don t Block Elements Examples Paragraphs (<p>), Headings, Lists, Tables, Division (<div>), Block Quotations, Preformatted Text (<pre>) Inline Elements Examples Anchors (<a>), Images (<img>), Line Breaks (<br />) Block elements may contain other block elements, inline elements, and data. Some block elements may not contain other block elements. Inline elements may contain inline elements and data. 27

Inline Elements in Block Elements Why the following example does not validate? Example: validationproblem.html 28

Suggestions for Writing HTML Code Add the corresponding end tag immediately Use indentation Have a consistent style Use comments to separate sections of your code. Validate your code as you develop it. 29

Googles Page Creator http://pages.google.com/ You need a gmail account Provides free hosting Your address will be: http://yourgmailid/googlepages.com 30

CSS (Cascading Style Sheets) Official W3C standard for controlling presentation Specification: http://www.w3.org/tr/css21/ Style Sheets Text file with rules. It includes no html. Style sheets files use a.css extension Allows you to apply typographic styles (font size, line spacing, etc.) Allows you to apply spacing instructions Allows you to have page layout control Allows you to generate smaller html files by avoiding redundancy in style specification Allows you to easily update a collection of pages by updating only a single file Why CSS? Demo 31

Rules Rule - Basic element of a style sheet Rule - describes the formatting associated with a page element Rule format selector declaration selector identifies what should be styled in a web document (e.g., h1, p) declaration what and how that portion of the web document should be modified. declaration - consists of property: value pair(s) enclosed in { } Examples: h1 {color: green} p {font-size: 10px, color: red; } Notice there is a space after the colon (;) Popular properties color, font-family, font-size, text-decoration HTML Dog CSS Properties http://www.htmldog.com/reference/cssproperties/ 32

Types of Style Sheets Inline Internal Style information applied to specific tag (e.g., <p style= ) Avoid if possible. Using the <style> tag in the header of the html document Convenient to provide own style to a specific page Example: internalstyle.html External External style sheet which web pages link to Preferred approach Example: externalfile.html and externalfile.css 33

CSS Why cascading? Rules can come from different sources (inline, external file, etc.). The final set of rules that apply to a document comes from cascading all the sources. Rule Conflict Resolution To resolve conflicts, styles defined at a specific level override those set at a higher level Example: you can set the color of body text to be blue but you can override to red the text in a list When multiple style files are linked or imported the last will take precedence A child element inherits the same properties of its parent element (unless otherwise specified). 34

CSS Validator http://jigsaw.w3.org/css-validator/ Notice you have three choices by URI by File Upload by direct input 35

Colors You can specify colors using one of the following predefined colors: yellow, white, teal, silver, red, purple, orange, olive, navy, maroon, lime, green, gray, fuchsia, blue, black, aqua Source for colors http://www.w3schools.com/html/html_colors.asp You can specify a color by indicating the red, green and blue components. For example, all the following are equivalent: red rgb(255,0,0) #ff0000 36

Kinds of Selectors Type Selectors Those based on the name of an HTML tag p { color: red; } Pseudo-classes attached to selectors to specify a state. Four popular pseudo-classes are a:link initial color of a link a:visited color for a visited link a:hover color when mouse hover over link a:active color during the clicking of the link Example: selectors.html, selectors.css 37

Kinds of Selectors Class Selectors Allow us to apply the same CSS rule to different elements Use when you need to apply a style to many times in your document Created with a period (also known as full stop) Example: classidselectors.html, classidselectors.css ID Selectors Like class selectors but appear only once in the document Used when you need to apply a style only once in your document Created using # Example: classidselectors.html, classidselectors.css Others (will see them later on) Descendant Selectors, child selectors, attribute selectors, universal selectors Example: selectors.html, selectors.css 38