 Derived from SGML  Original intent: General layout of documents that could be displayed by a wide variety of computers  HTML standards by W3C: › The.

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

Dr. Alexandra I. Cristea XHTML.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML: HyperText Markup Language Hello World Welcome to the world!
Learning HTML Internet and Web Application Development SWE 444 Dr. Ahmed Youssef.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
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.
MR.Mohammed Sharaf al Shareef
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
HTML 2. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension  With newer software it.
Computer Sciences Department
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
CS105 Introduction to Computer Concepts HTML
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.
Chapter 2 Introduction to XHTML. © 2006 Pearson Addison-Wesley. All rights reserved Origins and Evolution of HTML - HTML was defined with SGML.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML.
HTML & XHTML TAGS. Origins and Evolution of HTML HTML was defined with SGML Original intent of HTML: General layout of documents that could be displayed.
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.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
Chapter 2 © 2003 by Addison-Wesley, Inc Origins and Evolution of HTML - Derived from SGML - Original intent: General layout of documents that could.
Chapter 2 Introduction to XHTML Origins and Evolution of HTML - HTML was defined with SGML - Original intent of HTML: General layout of documents.
CS 299 – Web Programming and Design Introduction to HTML.
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 stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
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.
CP476 Internet Computing Lecture 7 HTML 1 What is HTML? HyperText Markup Language (HTML) is an application of Standard Generalized Markup Language (SGML)
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Web Design and Development for Business Lecture 3 Hyper Text Markup Language (HTML)
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.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software 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,
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
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.
WEEK -1 ACM 262 ACM 262 Course Notes. HTML What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML.
Chapter 2 Introduction to XHTML. HTML was defined with SGML Original intent of HTML: General layout of documents that could be displayed by a wide variety.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
1 HTML: HyperText Markup Language Representation and Management of Data on the Internet.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
INT222 – Internet Fundamentals
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
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.
Introduction to HTML.
2.1 Origins and Evolution of HTML
WEBSITE DESIGN Chp 1
CHAPTER 3 INTRODUCTION TO HTML AND XHTML
1 Introduction to XHTML.
Presentation transcript:

 Derived from SGML  Original intent: General layout of documents that could be displayed by a wide variety of computers  HTML standards by W3C: › The 1 st HTML standard: HTML 2.0 – 1995 › HTML 3.2 – 1997 › HTML › XHTML 1.0 – 2000 (a redefinition of HTML 4.01 using XML) › XHTML 1.1 – 2001 › XHTML 2.0 › HTML 5 - HTML5 is still a work in progress. However, the major browsers support many of the new HTML5 elements and APIs. › HTML5 will be the new standard for HTML. › XHTML 5 is undergoing development, as part of the HTML5 specification. 2

 HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The markup tags tell the Web browser how to display the page  An HTML file must have an ‘htm’ or ‘html’ file extension  An HTML file can be created using a simple text editor, like Notepad 3

 HTML elements are defined using HTML tags.  HTML tags are surrounded by the two characters, called angle brackets  HTML tags normally come in pairs like and  The first tag in a pair is the start tag, the second tag is the end tag  The text between the start and end tags is the element content  HTML tags are not case sensitive, means the same as 4

 This is an HTML element: This text is bold › What is the start tag, content of the HTML element and the end tag?  Tags can have attributes › Attributes can provide additional information about the HTML elements on your page. › Example, › Attributes always come in name/value pairs like this: name="value" › Quote Styles, "red" or 'red'?  Comment form:  Browsers ignore comments, unrecognizable tags,line breaks, multiple spaces, and tabs 5

Title of page This is my first homepage. This text is bold  The whole document must have as its root  A document consists of a head and a body or frameset  The tag is used to give the document a title, which is normally displayed in the browser’s window title bar (at the top of the display) 6

 Paragraph Elements › The tag breaks the current line and inserts a blank line › The new line gets the beginning of the content of the paragraph  W3C HTML Validation Service ›  Line breaks › The effect of the tag is the same as that of, except for the blank line, No closing tag!  Example of paragraphs and line breaks On the plains of hesitation bleach the bones of countless millions who, at the dawn of victory sat down to wait, and waiting, died. › What is the output of this code?? 7

 Headings › Six sizes, 1 - 6, specified with to › 1, 2, and 3 use font sizes that are larger than the default font size › 4 uses the default size › 5 and 6 use smaller font sizes 8

 Font Styles and Sizes (can be nested) › Boldface - › Italics - › Larger - › Smaller - › Monospace -  Superscripts and subscripts › Subscripts with › Superscripts with › Example: x 2 3 › Display: x 2 3  All of this font size and font style stuff can be done with style sheets, but these tags are not yet deprecated 9

 Character Entities › There are some characters that HTML treats as special characters, so if you want one in a document, it must be coded › The Most Common Character Entities:  Horizontal rules › draws a line across the display, after a line break 10

 A link is specified with the href (hypertext reference) attribute of (anchor) tag  The content of is the visual link in the document  The syntax of creating an anchor: Text to be displayed  This anchor defines a link to W3Schools: Visit W3Schools! › How the line above will look like in a browser??  Links can have images: >Info on C210 11

 The Target Attribute › With the target attribute, you can define where the linked document will be opened. Hi  The Anchor Tag and the Name Attribute › The name attribute is used to create a named anchor. When using named anchors we can create links that can jump directly into a specific section on a page. › The line below defines a named anchor: Useful Tips Section › To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL, like this: Jump to the Useful Tips Section › A hyperlink to the Useful Tips Section from WITHIN the file "links.htm" will look like this: Jump to the Useful Tips Section 12

 Images are inserted into a document with the tag with the src attribute  The tag is empty, which means that it contains attributes only and it has no closing tag.  src stands for "source". The value of the src attribute is the URL of the image you want to display on your page.  The syntax of defining an image:  The Alt attribute is used to define an "alternate text" for an image. The value of the alt attribute is an author-defined text:  In which cases, the ALT attribute will be useful?? 13

 Unordered Lists › The list items are marked with bullets (typically small black circles). › An unordered list starts with the tag. Each list item starts with the tag Coffee Milk › Here is how it looks in a browser:  Coffee  Milk  Ordered Lists › The list items are marked with numbers. › An ordered list starts with the tag. Each list item starts with the tag. Coffee Milk › Here is how it looks in a browser: 1.Coffee 2.Milk 14

 A table is a matrix of cells, each possibly having content › The cells can include almost any element  A table is specified as the content of a tag  A border attribute in the tag specifies a border between the cells  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 15

Fruit Juice Drinks Apple Orange Screwdriver Breakfast Lunch 1 0 Dinner

 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 Fruit Juice Drinks Orange Apple Screwdriver 17

 If the rows have labels and there is a spanning column label, the upper left corner must be made larger, using rowspan Fruit Juice Drinks and Meals Fruit Juice Drinks Apple Orange Screwdriver ………… 18

 The align attribute controls the horizontal placement of the contents in a table cell › Values are left, right, and center › 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 › 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 19

 Frames are rectangular sections of the display window, each of which can display a different document › One common use of frames is to have a list of links in a left frame and use the right frame to display the destination document of the chosen link  The tag specifies the number of frames and their layout in the window › takes the place of - Cannot have both! › must have either a rows attribute or a cols attribute, or both (usually the case) › The possible values for rows and cols are numbers, percentages, and asterisks › A number value specifies the row height in pixels - Not terribly useful! › A percentage specifies the percentage of total window height for the row - Very useful! 20

 An asterisk after some other specification gives the remainder of the height of the window › Examples: <frameset rows = "50%, 25%, 25%“ cols = "40%, *">  The tag specifies the content of a frame  The first tag in a specifies the content of the first frame, etc. › Row-major order is used › Frame content is specified with the src attribute › Without a src attribute, the frame will be empty (such a frame CANNOT be filled later) 21

 Scrollbars are implicitly included if needed (they are needed if the specified document will not fit) › If a name attribute is included, the content of the frame can be changed later (by selection of a link in some other frame) Frames <frame src = "fruits.html" name = "descriptions” /> 22

<!-- contents.html - The contents of the first frame of frames.html, which is the table of contents for the second frame --> Table of Contents Frame Fruits <a href = "apples.html" target = "descriptions"> apples <a href = "bananas.html" target = "descriptions"> bananas <a href = "oranges.html" target = "descriptions"> oranges 23

24

 Nested frames - to divide the screen in more interesting ways 25

26

 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 objects are called widgets (e.g., radio buttons and checkboxes) › 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 = › If the form has no action, the value of action is the empty string 27

 The method attribute of specifies one of the two possible techniques of transferring the form data to the server, get and post. › What are differences between these two methods?  Widgets › Many are created with the tag- The type attribute of specifies the kind of widget being created 1. 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 28

2. 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" 29

Grocery Checklist <input type = "checkbox" name = "groceries" value = "milk" checked = "checked"> Milk <input type = "checkbox" name = "groceries" value = "bread"> Bread <input type = "checkbox" name = "groceries" value= "eggs"> Eggs 30

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 Age Category <input type = "radio" name = "age" value = "under20" checked = "checked"> 0-19 <input type = "radio" name = "age" value = "20-35"> <input type = "radio" name = "age" value = "36-50"> <input type = "radio" name = "age" value = "over50"> Over 50 31

4. 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 pre-selected 32

Grocery Menu - milk, bread, eggs, cheese With size = 1 (the default) milk bread eggs cheese 33

 After clicking the menu  After changing the size to 2 34

5. 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 Please provide your employment aspirations <textarea name = "aspirations" rows = "3” cols = "40"> (Be brief and concise) 35

6. Reset and Submit buttons › Both are created with › Submit has two actions:  Encode the data of the form  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 --> SHOW a browser display of a form 36

37

 XHTML stands for EXtensible HyperText Markup Language  XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as an XML application  XHTML 1.0 became an official W3C Recommendation January 26,  All new browsers support XHTML 38

 The following HTML code will work fine if you view it in a browser, even if it does not follow the HTML rules: This is bad HTML Bad HTML  XML is a markup language where everything has to be marked up correctly, which results in "well-formed" documents.  XML was designed to describe data and HTML was designed to display data.  XHTML is a combination of HTML and XML  Today's market consists of different browser technologies › Browsers run internet on computers, mobile phones and handhelds. 39

 XHTML pages can be read by all XML enabled devices AND while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible !!! 40

 XHTML elements must be properly nested This text is bold and italic  XHTML documents must be well-formed...  Tag names must be in lowercase This is a paragraph [WRONG!!] This is a paragraph [CORRECT!!]  All XHTML elements must be closed This is a paragraph › Empty elements must either have an end tag or the start tag must end with />, any EXAMPLE??? 41

Some More XHTML Syntax Rules:  Attribute names must be in lower case  Attribute values must be quoted  Attribute minimization is forbidden  The id attribute replaces the name attribute  The XHTML DTD defines mandatory elements › All XHTML documents must have a DOCTYPE declaration. › The html, head and body elements must be present, and the title must be present inside the head element. › The DOCTYPE declaration is not a part of the XHTML document itself. It is not an XHTML element, and it should not have a closing tag. 42