CP476 Internet Computing Lecture 7 HTML 1 What is HTML? HyperText Markup Language (HTML) is an application of Standard Generalized Markup Language (SGML)

Slides:



Advertisements
Similar presentations
HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
Advertisements

HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
HTML and XHTML Controlling the Display Of Web Content.
HTML and XHTML Controlling the Display Of Web Content.
Markup Languages Controlling the Display Of Web Content.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Marking Up With Html: A Hypertext Markup Language Primer
Database-Driven Web Sites, Second Edition1 Chapter 2 INTRODUCTION TO HTML.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
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.
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.
Chapter 2 HTML (Hypertext Markup Language) Part I.
DAT602 Database Application Development Lecture 14 HTML.
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
COM621 – Interactive Web Development Lecture 1 - XHTML.
Chapter 2 © 2003 by Addison-Wesley, Inc Origins and Evolution of HTML - Derived from SGML - Original intent: General layout of documents that could.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
 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.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
1 HTML محمد احمدی نیا 2 Of 43 What is HTML?  HTML stands for Hyper Text Markup Language  HTML is not a programming language, it.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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,
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
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.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
HTML Forms A Preliminary Step into Dynamic Web Fred Durao
TJ 3043 – Web Application Development HTML Form. 2.0 Forms A form is the usual way to communicate information from a Web browser to a server HTML has.
CP102 Module 7: HTML 1 Module 7: HTML 1.What is 1.What is HTML? 2. 2.Basic syntax, document structure 3. 3.Basic formatting, images, links 4. 4.Lists,
TJ 3043 – Web Application Development HTML Form. 2.0 Forms - A form is the usual way information is gotten from a browser to a server - HTML has tags.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
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.
HTML Forms.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with 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.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
Writing Your Own Web Page: Using HTML and FrontPage Chapter 10.
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
1999, COMPUTER SCIENCE, BUU Introduction to HTML Seree Chinodom
INT222 – Internet Fundamentals
Building a Web Page. A Brief History In 1989, Tim Berners-Lee invented the Web. To enable particle physics from around the world to organize and share.
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.
COM621: Advanced Interactive Web Development Lecture 1 – XHTML.
 Derived from SGML  Original intent: General layout of documents that could be displayed by a wide variety of computers  HTML standards by W3C: › The.
Marking Up with XHTML Tags describe how a web page should look
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 5 Introduction to XHTML: Part 2
Introduction to XHTML.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
1 Introduction to XHTML.
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:

CP476 Internet Computing Lecture 7 HTML 1 What is HTML? HyperText Markup Language (HTML) is an application of Standard Generalized Markup Language (SGML) for marking up WWW documents. HTML allows to –Publish documents to the Internet in a format not dependent on platform –Present text, graphics and multimedia data in a document –Create links pointing to other WWW documents. With HTML, all WWW documents together with their links form a directed graph. – Two WWW documents T1 and T2 is connected by and directed edge (T1, T2) if T1 contains a hypertext link to T2. –The design of search engine is based on this graph model of WWW) Lecture 7. HTML Objective: to understand the HTML: basic syntax, document structure, formatting, images, links, lists, table, forms, etc

CP476 Internet Computing Lecture 7 HTML 2 HTML was originally developed by Tim Berners-Lee 1990, and had gone through a sequence of versions. Now it is a legacy of W3C. –HTML2.0 (RFC 1866) was the first officially released HTML version. Which was developed by IETF HTML working group (T. Berners-Lee and D. Connolly), and released in –HTML3.2 was released in1997 by W3C W3C was founded in 1994 by T. Berners-Lee Frames was introduced. –HTML 4.0 was first released in 1997 by W3C Cascading Style Sheet was introduced. –HTML 4.01 was recommended in 1999 by W3C –HTML4.01 was modified to XHTML1.0 in 2000 to conform to XML (eXtensible Markup Language) –XHTML1.1 is the current recommended version XML is a more extended than HTML. It enables designers to create their own tags, structures to indicate specific information. XHTML is a special case of XML.

CP476 Internet Computing Lecture 7 HTML 3 Standard HTML document structure ……..…………………. –The whole document must have as its root –A document consists of a head and a body or a frameset –The tag is used to give the document a title, which is normally displayed in the browser’s window title bar –An SGML DOCTYPE command is required by XHTML 1.0, but there is not enough room on these slides to show it - see book for its exact form DOCTYPE provides a DTD for the version of XHTML that is used for the document

CP476 Internet Computing Lecture 7 HTML 4 Basic Syntax –Tag and elements Tags are markups to tell browser how to display it’s contents. An element: tags and its marked contents. –Tag format: Opening tag Closing tag Not case sensitive –The content of a tag appears between its opening tag and its closing tag. Not all tags have content –If a tag has no content, its form is –If a tag has attributes, they appear between its name and the right bracket –Tag names and attribute names must be written in lowercase letters –Every tag that has content must have a closing tag Tags must be properly nested Comment form: –Browsers ignore comments, unrecognizable tags, line breaks, multiple spaces, and tab

CP476 Internet Computing Lecture 7 HTML 5 Basic text formatting 1.Paragraph Elements: 2.Line break tag 3.Heading, …, is the default size and use smaller font size 4.Blockquote Preformatted 5.Font Styles and Sizes (can be nested) Boldface - Italics - Larger - Smaller - Monospace - 6.Superscripts and subscripts Subscripts with Superscripts with 7.Character Entities Char EntityMeaning &&ampAmpersand &gtGreater than "&quotDouble quote '&aposSingle quote ¼&frac14One quarter ½&frac12One half ¾&frac34Three quarters  &degDegree (space)&nbspNon-breaking space 8.Horizontal rules

CP476 Internet Computing Lecture 7 HTML 6 Images –GIF (Graphic Interchange Format) 8-bit color (256 different colors) –JPEG (Joint Photographic Experts Group) 24-bit color (16 million different colors) –Portable Network Graphics (PNG) –Images are inserted into a document with tag with the src attribute Alt attribute is required for XHTML1.0

CP476 Internet Computing Lecture 7 HTML 7 Hypertext Links –Hypertext is the essence of the Web! –Both links (sometimes called sources) and targets (or anchors) of links are specified with the anchor tag ( ) –A link is specified with the href (hypertext reference) attribute of –The content of is the visual link in the document –If the target is a whole document (not the one in which the link appears), the target need not be specified in the target document as being the target –Note: Relative addressing of targets is easier to maintain and more portable than absolute addressing

CP476 Internet Computing Lecture 7 HTML 8 If the target is a document fragment, the target spot must be marked somehow. Target labels can be defined in many different tags with the id attribute, as in Baskets The link to an id must be preceded by a pound sign (#); If the id is in the same document, this target could be If the link is in a different document, the document reference must be included Baskets Style note: links should blend in with the surrounding text, so reading it without taking the link should not be made less pleasant Links can have images

CP476 Internet Computing Lecture 7 HTML 9 Lists –Unordered lists The list is the content of the tag List elements are the content of the tag –Ordered lists The list is the content of the tag Each item in the display is preceded by a sequence value –Nested lists Any type list can be nested inside any type list The nested list must be in a list item –Definition lists (for glossaries, etc.) List is the content of the tag Terms being defined are the content of the tag The definitions themselves are the content of the tag

CP476 Internet Computing Lecture 7 HTML 10 Tables –A table is a matrix of cells, each possibly having content The cells can include almost any element Some cells have row or column lables and some have data –A table is specified as the content of a tag A border attribute in the tag specifies a border between the cells If border is set to "border", the browser’s default width border is used The border attribute can be set to a number, which will be the border width Without the border attribute, the table will have no lines! –Tables are given titles with the tag, which can immediately follow –Each row of a table is specified as the content of a tag The row headings are specified as the content of a tag The contents of a data cell is specified as the content of a tag

CP476 Internet Computing Lecture 7 HTML 11 –A table can have two levels of column labels If so, the colspan attribute must be set in the tag to specify that the label must span some number of columns If the rows have labels and there is a spanningcolumn label, the upper left corner must be made larger, using rowspan The align attribute controls the horizontal placement of the contents in a table cell Values are left, right, and center (default) align is an attribute of,, and elements The valign attribute controls the vertical placement of the contents of a table cell Values are top, bottom, and center (default) valign is an attribute of and elements –The cellspacing attribute of is used to specify the distance between cells in a table The cellpadding attribute of is used to specify the spacing between the content of a cell and the inner walls of the cell

CP476 Internet Computing Lecture 7 HTML 12 Forms –A form is the usual way information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this information gathering –The form objects are called widgets (e.g., radio buttons and checkboxes). There are 8 types of widgets –When the Submit button of a form is clicked, the form’s values are sent to the server –All of the widgets, or components of a form are defined in the content of a tag –The only required attribute of is action, which specifies the URL of the application that is to be called when the Submit button is clicked action = bin/popcorn.plhttp://physcomp1.wlu.ca/~hfan/cgi- bin/popcorn.pl –If the form has no action, the value of action is the empty string

CP476 Internet Computing Lecture 7 HTML 13 The method attribute of specifies one of the two possible techniques of transferring the form data to the server, get and post. Widgets –Many are created with the tag The type attribute of specifies the kind of widget being created a. Text Creates a horizontal box for text input Default size is 20; it can be changed with the size attribute If more characters are entered than will fit, the box is scrolled (shifted) left If you don’t want to allow the user to type more characters than will fit, set maxlength, which causes excess input to be ignored

CP476 Internet Computing Lecture 7 HTML Checkboxes - to collect multiple choice input Every checkbox requires a value attribute, which is the widget’s value in the form data when the checkbox is ‘checked’ A checkbox that is not ‘checked’ contributes no value to the query string By default, no checkbox is initially ‘checked’ To initialize a checkbox to ‘checked’, the checked attribute must be set to "checked” 3. Radio Buttons - collections of checkboxes in which only one button can be ‘checked’ at a time Every button in a radio button group MUST have the same name If no button in a radio button group is ‘pressed’, the browser often ‘presses’ the first one

CP476 Internet Computing Lecture 7 HTML Menus - created with tags There are two kinds of menus, those that behave like checkboxes and those that behave like radio buttons (the default) Menus that behave like checkboxes are specified by including the multiple attribute, which must be set to "multiple“ The name attribute of is required The size attribute of can be included to specify the number of menu items to be displayed (the default is 1) If size is set to > 1 or if multiple is specified, the menu is displayed as a pop-up menu Each item of a menu is specified with an tag, whose pure text content (no tags) is the value of the item An tag can include the selected attribute, which when assigned "selected" specifies that the item is preselected

CP476 Internet Computing Lecture 7 HTML Text areas - created with Usually include the rows and cols attributes to specify the size of the text area Default text can be included as the content of Scrolling is implicit if the area is overfilled 6. Reset and Submit buttons Both are created with Submit has two actions: –1. Encode the data of the form –2. Request that the server execute the server- resident program specified as the value of the action attribute of A Submit button is required in every form 7. Password 8. Hidden field