IS333: MULTI-TIER APPLICATION DEVELOPMENT

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

INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 1.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
Web Development University of Khartoum. Web Development Web Programming Web Design University of Khartoum.
Understanding HTML Code
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
HTML Hyper Text Markup Language It is used for describing web documents or web pages. A markup language is set of markup tags. HTML documents are described.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
HTML: Hyptertext Markup Language Doman’s Sections.
WEB DESIGN AND PROGRAMMING Introduction to XHTML.
Internet & World Wide Web How to Program, 5/e. Revised by Dr. T. Tran for CSI3140 Copyright © Pearson, Inc All Rights Reserved.2.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
CS3101 Internet Programming. Chapter 01 Introduction to XHTML 2Internet Programming - Chapter 01:XHTML Slides based on: Programming the World Wide Web.
Copyright © Pearson, Inc All Rights Reserved. WEEK 7: INTRODUCTION TO HTML5 Sotiris Charalambous.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to HTML5.
HTML Basics.
4 Introduction to XHTML.
4 Introduction to XHTML.
4 Introduction to XHTML.
Elements of HTML Web Design – Sec 3-2
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chapter 1: Introduction to XHTML (part 1)
HTML5 Hyper Text Markup Language version 5
The Web Warrior Guide to Web Design Technologies
Chapter 5 Introduction to XHTML: Part 2
Introduction to XHTML.
Elements of HTML Web Design – Sec 3-2
Chapter 4 - Introduction to XHTML: Part 1
Chapter 5 - Introduction to XHTML: Part 2
4 Introduction to XHTML.
Computers and Scientific Thinking David Reed, Creighton University
1 Introduction to XHTML.
Introduction to HTML- Basics
Introduction to XHTML Cont:.
Introduction to HTML.
Presentation transcript:

IS333: MULTI-TIER APPLICATION DEVELOPMENT Lecture 2: HTML5 Information Systems Department

Information Systems Department Objectives Understand important components of HTML5 documents. Use HTML5 to create web pages. Add images to web pages. Create and use hyperlinks to help user navigate web pages. Mark up lists of information. Create tables with rows and columns of data. Create and use forms to get user input. 10-May-19 Information Systems Department

Information Systems Department Introduction HTML: Hyper Text Markup Language HTML5 is a markup language that specifies the structure and content of documents that are displayed in web browsers. HTML5 markup contains text, images, graphics, animations, audios and videos that represents the content of a document and also contains elements that specify a document’s structure and meaning. 10-May-19 Information Systems Department

Creating HTML5 Document HTML5 document is created by typing HTML5 markup text in a text editor (Notepad, TextEdit, vi, emacs) and saving it with the .html or .htm filename extension. Normally, HTML5 documents are stored in a web server. Clients (such as web browsers running on your local computer or smartphone) request specific resources (HTML5 documents from web servers). 10-May-19 Information Systems Department

Information Systems Department First HTML5 Document main.html 10-May-19 Information Systems Department

Document Type Declaration The document type declaration (DOCTYPE) in line 1 is required in HTML5 documents so that browsers render the page in standard mode, according to the HTML and CSS specifications. You have to include the DOCTYPE in each HTML5 document you create. 10-May-19 Information Systems Department

Information Systems Department Blank Lines Blank line (line 2) is included to make the document easier to read. The browser ignores the blank line. 10-May-19 Information Systems Department

Information Systems Department Comments Line 3 is HTML5 comments. HTML5 comments start with <!-- and end with -->. It is used to improve readability and describe the content of a document. The browser ignores comments (they will not be displayed). 10-May-19 Information Systems Department

Information Systems Department html Element html element starts in line 4 and ends in line 14. The html element encloses the head section (represented by the head element) and the body section (represented by the body element). 10-May-19 Information Systems Department

Information Systems Department head Element head element starts in line 5 and ends in line 8. The head section contains information about the HTML5 document: The character set (UTF-8, the most popular character- encoding scheme for the web) that is used in line 6 - which helps the browser determine how to render the content Title (line 7) CSS3 Javascript 10-May-19 Information Systems Department

Information Systems Department body Element The body element (lines 10-12) contains the page’s content, which the browser displays when the user visits the web page. 10-May-19 Information Systems Department

Information Systems Department Start Tags and End Tags HTML5 documents delimit most elements with a start tag and an end tag. A start tag consists of the element name in angle brackets. E.g: <html> in line 4. An end tag consists of the element name preceded by a forward slash (/) in angle brackets. E.g: </html> in line 14. 10-May-19 Information Systems Department

Information Systems Department title Element Line 7 specifies a title element. This is called a nested element, because it’s enclosed in the head element’s start and end tags. Is head element also a nested element? The title element describes the web page: Title usually appear in the title bar at the top of the browser window. Title is used as the text identifying a page when users add the page to their list of Favorites or Bookmarks. Search engines use the title for indexing purposes and when displaying results. 10-May-19 Information Systems Department

Information Systems Department Paragraph Element The paragraph element denoted with <p> and </p> in line 11 help define the structure of a document. All the text placed between the <p> and </p> tags forms one paragraph. When a browser renders a paragraph, it places extra space above and below the paragraph text. 10-May-19 Information Systems Department

Information Systems Department Headings heading.html Some text in an HTML5 document may be more important than other text. HTML5 provides six heading elements (h1 through h6) for specifying the relative importance of information. Heading element h1 (line 11) is considered the most significant one and is typically rendered in a larger font than the other five (lines 12-16). Each successive heading element (h2, h3, until h6) is typically rendered in a progressively smaller font. 10-May-19 Information Systems Department

Information Systems Department Headings (cont.) 10-May-19 Information Systems Department

Information Systems Department Linking One of the most important HTML5 features is the hyperlink, which references (or links to) other resources: a web page a file an e-mail address Links are created using the a (anchor) element with href (hypertext reference) attribute which specifies the resource’s location. Any displayed element can act as a hyperlink. Web browsers typically underline text hyperlinks and color their text blue by default so that users can distinguish hyperlinks from plain text. 10-May-19 Information Systems Department

Linking to other web pages links.html Line 12 introduces the strong element, which indicate that its content has high importance. Browsers typically render such text in a bold font. 10-May-19 Information Systems Department

Linking to other web pages The browser changes the color of any text link once you have clicked the link (purple by default). 10-May-19 Information Systems Department

Information Systems Department Linking to a File navigation.html 10-May-19 Information Systems Department

Linking to an E-Mail Address Anchors can link to e-mail address using a mailto: URL. When the user clicks this type of anchored link, most browsers launch the user’s default e-mail program (e.g Mozilla Thunderbird, Microsoft Outlook or Apple Mail) to enable the user to write an e-mail message to the linked e-mail address. 10-May-19 Information Systems Department

Linking to an E-Mail Address contact.html 10-May-19 Information Systems Department

Linking to an E-Mail Address 10-May-19 Information Systems Department

Hyperlinking to an E-Mail Address 10-May-19 Information Systems Department

Information Systems Department Images picture.html 10-May-19 Information Systems Department

Information Systems Department Images The img element is used to include an image in the document (lines 13-16). The image file’s location is specified with the src (source) attribute. This image is located in the same directory as the HTML5 document, so only the image’s file name is required. This is known as relative path – the image is stored relative to the location of the document. 10-May-19 Information Systems Department

Information Systems Department Images Optional attributes width and height specify the image’s dimensions. If these attributes are omitted, the browser uses the image’s actual width and height. Images are measured in pixels (picture elements), which represent dots of color on the screen. 10-May-19 Information Systems Department

Information Systems Department Images: alt Attribute A browser may not be able to render an image for several reasons. It may not support images – as if the case with text-only browsers – or the client may have disabled image viewing to reduce download time. Every img element in an HTML5 document must have an alt attribute. If a browser cannot render an image, the browser displays the alt attribute’s value. 10-May-19 Information Systems Department

Information Systems Department Images: The Output 10-May-19 Information Systems Department

Using Images as Hyperlinks By using images as hyperlinks, you can create graphical web pages that link to other resources. nav.html 10-May-19 Information Systems Department

Using Images as Hyperlinks Lines 13-16 create an image hyperlink by nesting an img element in an anchor element. The img element’s src attribute value specifies that this image (main.png) resides in a directory named button. The button directory and the HTML5 document are in the same directory. Clicking an image hyperlink takes a user to the web page specified by the surrounding anchor element’s href attribute. 10-May-19 Information Systems Department

Using Images as Hyperlinks 10-May-19 Information Systems Department

Information Systems Department Special Characters When marking up text, certain characters or symbol may be difficult to embed directly into an HTML5 document. Some keyboards do not provide these symbols (such as ©), or their presence in the markup may cause syntax errors (as with <). 10-May-19 Information Systems Department

Information Systems Department Special Characters HTML5 Character Entities Symbol Description Character entity reference & ampersand & ‘ apostrophe &apos; > greater-than < less-than “ quote " 10-May-19 Information Systems Department

Information Systems Department Special Characters Other Common Character Entities Symbol Description Character entity reference Non-breaking space   © copyright © — em dash — – en dash – 1 4 fraction 1/4 ¼ 1 2 fraction 1/2 ½ 3 4 fraction 3/4 ¾ … horizontal ellipsis … 10-May-19 Information Systems Department

Information Systems Department Special Characters Other Common Character Entities Symbol Description Character entity reference ® registered trademark ® ™ trademark ™ § section § 10-May-19 Information Systems Department

Information Systems Department Lists Lists are used in a web page to organize content that similar in nature. Two types of list: Unordered list (ul) Ordered list (ol) 10-May-19 Information Systems Department

Information Systems Department Unordered List (ul) A simple bullet-style list that does not order its items by letter or number. Creates a list in which each item begins with a bullet symbol (typically a disc). Each entry in an unordered list is an li (list item) element. Most web browsers render each li element on a new line with a bullet symbol indented from the beginning of the line. 10-May-19 Information Systems Department

Information Systems Department Ordered List (ol) Create a list in which each item begins with a number. Items in an ordered list are enumerated 1., 2., 3., and so on. 10-May-19 Information Systems Department

Information Systems Department Nested List 10-May-19 Information Systems Department

Information Systems Department Nested List Lists may be nested to represent hierarchical relationships, as in a multilevel outline. list.html 10-May-19 Information Systems Department

Information Systems Department Tables 10-May-19 Information Systems Department

Information Systems Department Tables table1.html table1.html 10-May-19 Information Systems Department

Information Systems Department Tables Tables are frequently used to organize data into rows and columns. Tables are defined with the table element (lines 12- 56). Line 12 specifies the table element’s start tag. The border attribute with the value “1” specifies that the browser should place borders around the table and the table’s cells. The caption element (lines 15-16) specifies a table’s title. Text in this element is typically rendered above the table. 10-May-19 Information Systems Department

Information Systems Department Tables A table has three distinct sections – head, body, and foot. The head section (or header cell) is defined with a thead element (lines 20-25), which contains header information such as column names. Each tr element (lines 21-24) defines an individual table row. The columns in the thead section are defined with th element. Most browsers center text formatted by th ( table header column) elements and display them in bold. 10-May-19 Information Systems Department

Information Systems Department Tables The body section, or table body, contains the table’s primary data. The table body (lines 38-55) is defined in a tbody element. In the table body, each tr element specifies one row. Data cells contain individual pieces of data and are defined with td (table data) elements in each row. 10-May-19 Information Systems Department

Information Systems Department Tables The tfoot section (lines 29-34) is defined with a tfoot (table foot) element. The text placed in the footer commonly includes calculation results and footnotes. 10-May-19 Information Systems Department

Table - Cells that Span Many Columns To make a cell span more than one column, use the colspan attribute: 10-May-19 Information Systems Department

Table - Cells that Span Many Rows To make a cell span more than one row, use the rowspan attribute: 10-May-19 Information Systems Department

Information Systems Department Forms HTML5 provides a mechanism, called a form, for collecting data from user. 10-May-19 Information Systems Department

Information Systems Department Forms form.html 10-May-19 Information Systems Department

Information Systems Department Forms The form is defined in lines 19-43 by a form element. method attribute (line 19) specifies how the form’s data is sent to the web server. The action attribute (line 19) specifies the URL of a script on the web server that will be invoked to process the form’s data. 10-May-19 Information Systems Department

Information Systems Department Forms Lines 22-23 define input elements that specify data to provide to the script that process the form (also called the (form handler). An input’s type is determined by its type attribute (text, submit, reset, hidden, password, radio, checkbox). The form.html document uses a text input, a submit input, a reset input, and three hidden input. 10-May-19 Information Systems Department

Information Systems Department Forms: Hidden Input Forms can contain visual and nonvisual components. Visual components include clickable buttons and other graphical user interface components with which users interact. Nonvisual components, called hidden inputs (lines 22-27), which allows you to send form data that is not input by a user. The other two input attributes are name, which identifies the input element, and value, which provides the value that will be sent (or posted) to the web server. The server uses the name attribute to get the corresponding value from the form. 10-May-19 Information Systems Department

Information Systems Department Forms: Text Input The text input in lines 31-32 inserts a text field in the form. Users can type data in text fields. The label element (lines 30-33) provides users with information about the input element’s purpose. The input element’s size attribute specifies the number of characters visible in the text field. Optional attribute maxlength limits the number of characters input into the text field – in this example, the user is not permitted to type more than 30 characters. 10-May-19 Information Systems Department

Information Systems Department Forms: Submit Input Two input elements in lines 40-41 create two buttons. The submit input element is a button. When the submit button is pressed, the form’s data is sent to the location specified in the form’s action attribute. The value attribute sets the text displayed on the button. 10-May-19 Information Systems Department

Information Systems Department Forms: Reset Input The reset input element allows a user to reset all form elements to their default values. The value attribute of the reset input element sets the text displayed on the button (the default value is Reset if you omit the value attribute). 10-May-19 Information Systems Department

Additional Form Elements 10-May-19 Information Systems Department

Additional Form Elements form2.html 10-May-19 Information Systems Department

Additional Form Elements form2.html 10-May-19 Information Systems Department

Information Systems Department Textarea Element The textarea element (lines 39-40) inserts a multiline text area into the form. The number of rows is specified with the rows attribute, and the number of columns (i.e., character per line) with the cols attribute. To display default text in the textarea, place the text between the <textarea> and </textarea> tags. 10-May-19 Information Systems Department

Password Input Element The password input in line 48 inserts a password box with the specified size (maximum number of displayed characters). A password box allows users to enter sensitive information , such as credit card number and passwords, by masking the information input with asterisks (*). The actual value input is sent to the web server, not the masking characters. 10-May-19 Information Systems Department

Checkbox Input Element Lines 55-69 introduce the checkbox input element. Checkboxes enable users to select a option. When a user selects a checkbox, a check mark appears in the checkbox. Otherwise, the checkbox remains empty. Each checkbox input creates a new checkbox. Checkboxes can be used individually or in groups. Checkboxes that belong to a group are assigned the same name (in this example, “thingliked”). 10-May-19 Information Systems Department

Information Systems Department Radio Input Element The radio button (lines 79-93) specified with type radio. Radio buttons are similar to checkboxes, except that only one radio button in a group of radio buttons may be selected at any time. The radio buttons in a group all have the same name attributes and are distinguished by their different value attributes. The attribute checked (line 81) indicates which radio button, if any, is selected initially. 10-May-19 Information Systems Department

Information Systems Department Select Element The select element (lines 101-114) provides a drop- down list from which the user can select an item. The name attribute identifies the drop-down list. The option elements (lines 102-113) add items to the drop-down list. The option element’s selected attribute specifies which item initially is displayed as the selected item in the select element. If no option element is marked as selected, the browser selects the first option by default. 10-May-19 Information Systems Department

Information Systems Department Reference Internet and World Wide Web How To Program , Deitel, Deitel & Deitel, 5th Edition (Chapter 2) 10-May-19 Information Systems Department