Introduction to XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg.

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

HTML: HyperText Markup Language Hello World Welcome to the world!
 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.
 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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 2 HTML (Hypertext Markup Language) Part I.
Introduction to XHTML September 13, Components of website development
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.
 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.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
HTML (HyperText Markup Language)
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
3 XHTML.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Xingquan (Hill) Zhu
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
 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.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
HTML: Hyptertext Markup Language Doman’s Sections.
Lesson 4.
Project 2 Web Page Design Creating and Editing a Web Page Pages
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
1 Introduction to XHTML: Part 1 Outline Introduction Elements and Attributes Editing XHTML Common Elements W3C XHTML Validation Service Headers Linking.
WEB DESIGN AND PROGRAMMING Introduction to XHTML.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 2.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Jozef Goetz contribution, J. Goetz, 2016  Pearson Education, 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.
INT222 – Internet Fundamentals
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introduction to XHTML/HTML5 (part 1) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web (multiple editions)
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
Introduction to HTML5.
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Chapter 24 – Introduction to XHTML Basic: Part I
Marking Up with XHTML Tags describe how a web page should look
Chapter 4 Introduction to XHTML: Part 1
HTML: HyperText Markup Language
Chapter 4 Introduction to XHTML: Part 1
Chapter 1: Introduction to XHTML (part 1)
Chapter 4 - Introduction to XHTML: Part 1
COMPUTING FUNDAMENTALS
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.
Introduction to HTML- Basics
Introduction to XHTML Cont:.
Introduction to HTML.
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 XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg

Introduction to XHTML 2 What is XHTML? XHTML EXtensible HyperText Markup Language – XHTML 1.1 – A markup language that specifies the format of the text that is displayed in a Web browser. presentation structure – Separation of the presentation of a document from the structure of the document’s information – Based on HTML A legacy technology of the World Wide Web Consortium (W3C)

Introduction to XHTML 3 Editing XHTML XHTML documents – Source-code form – Text editor (e.g. Notepad, emacs, etc.) –.html or.htm file-name extension – Web server Stores XHTML documents – Web browser Requests XHTML documents

XHTML DTD The XHTML standard defines three Document Type Definitions. The most common is the XHTML Transitional. An XHTML document consists of three main parts: 1. the DOCTYPE 2. the Head 3. the Body Introduction to XHTML 4

XHTML document types There are currently 3 XHTML document types: STRICT TRANSITIONAL FRAMESET Introduction to XHTML 5

XHTML 1.0 Strict <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" “ xhtml1xhtml1-strict.dtd"> Use this when you want really clean markup, free of presentational clutter. Use this together with CSS. Introduction to XHTML 6

XHTML 1.0 Transitional <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN’’ " /DTD/xhtml1-transitional.dtd"> Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets. Introduction to XHTML 7

XHTML 1.0 Frameset <!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN“ " DTD/xhtml1-frameset.dtd"> Use this when you want to use HTML Frames to partition the browser window into two or more frames. Introduction to XHTML 8

9 First XHTML Example (1) XHTML comments starts with Mandatory XHTML Elements: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “ Title goes here

Introduction to XHTML 10 First XHTML Example (2) html element is the root element of a XHTML document – head element – The element is a container for all the head elements. Elements inside can include scripts, instruct the browser where to find style sheets, provide meta information, and more. – The following tags can be added to the head section:,,,,,, and. – body element Body section: Page’s content the browser displays

Introduction to XHTML 11 First XHTML Example (3) body element Body section: Page’s content the browser displays – The tag defines the document's body. – The element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.

Introduction to XHTML 12 First XHTML Example (4) Every element starts with Start tag and ends with End tag, with the displayed content in between them. Example:...,.... Start tag may have attributes (provide additional information about an element) – A name and value pair – Example:

Introduction to XHTML 13 XHTML Syntax Rules XHTML documents must have one root element XHTML elements – be properly nested – be closed – be in lowercase Attribute names – be in lower case Attribute values – be quoted

Element / Tag The HTML Element – The tag defines the title of the document. – The element is required in all HTML/XHTML documents. The element: – defines a title in the browser toolbar – provides a title for the page when it is added to favorites – displays a title for the page in search-engine results A simplified HTML document: Title of the document The content of the document Introduction to XHTML 14

Introduction to XHTML 15 main.html (1 of 1)

Introduction to XHTML 16 Headers Six headers ( header elements): h 1 ~ h6

Introduction to XHTML 17

Introduction to XHTML 18 Linking Hyperlink – References other sources such as XHTML documents and images – Both text and images can act as hyperlinks – Created using the a (anchor) element: Attribute href specifies the location of a linked resource : href = “ Link to addresses: href =

Introduction to XHTML 19 links.html (1 of 2)

Introduction to XHTML 20 contact.html (1 of 1)

Introduction to XHTML 21 Malicious Link Manipulation Phishing: a link in an leads to the spoofed websitelink spoofed website – Make the anchor text for a link appear to be validanchor text for a link – Misspelled URL BR

Introduction to XHTML 22 Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) – img element with attributes: src attribute : Specifies the location of the image file width and height attributes: Pixels (“picture elements”) alt attribute : the text will be displayed if the browser could not display the image.

Introduction to XHTML 23 Images (2) Empty elements – Terminated by character / inside the closing right angle bracket ( > ), or by explicitly including the end tag – Example: br element: Line break – tag: Bold characters – Bold

Introduction to XHTML 24 picture.html (1 of 1)

Introduction to XHTML 25

Introduction to XHTML 26 Image as Link Use an image as a link Image has no border <img src="home.png" width="125" height="26" alt="Go Home" border="0" />

Introduction to XHTML 27 nav.html (1 of 2)

Introduction to XHTML 28

Introduction to XHTML 29 Internal Linking Enables the user to jump between locations in the same document – First, create an internal hyperlink destination by setting attribute id of an element – Second, create an internal link to this element. – Example: Bugs : Go to Bugs

Introduction to XHTML 30 links.html (1 of 3)

Introduction to XHTML 31 links.html (3 of 3)

Introduction to XHTML 32 Creating and Using Image Maps (1) Designate certain areas of an image (called hotspots) as links – Element map Attribute id identifies the image map – Element img Attribute usemap refers the map by id. – Example:..

Introduction to XHTML 33 Creating and Using Image Maps (2) Element area defines hotspot – Attribute shape and coords Specify the hotspot’s shape and coordinates Rectangular ( shape = “rect” ) Polygon ( shape = “poly” ) Circle ( shape = “circle” ) – Attribute href Specifies the link’s target. – Attribute alt Provides alternative text for the link.

Introduction to XHTML 34 picture.html (1 of 3)

Introduction to XHTML 35 picture.html (2 of 3)

Introduction to XHTML 36

Introduction to XHTML 37 Unordered Lists Unordered list element ul – Creates a list in which each item begins with a bullet symbol (called a disc) – li (list item): Entry in an unordered list – Format:

Introduction to XHTML 38 links2.html (1 of 2)

Introduction to XHTML 39

Introduction to XHTML 40 Nested and Ordered Lists Represent hierarchical relationships Ordered lists ( ol ) – Creates a list in which each item begins with a number – Format

Introduction to XHTML 41 list.html (1 of 3)

Introduction to XHTML 42 list.html (2 of 3)

Introduction to XHTML 43 list.html (3 of 3)

Introduction to XHTML 44

Introduction to XHTML 45 Type of Ordered List Attribute type defines the type of list Available types: type=“A” type=“a” type=“I” type=“i” type=“1”

Introduction to XHTML 46 Type of Unordered List Attribute type defines the type of list Available types: type=“disc” type=“square” type=“circle”

Introduction to XHTML 47 Special Characters and More Line Breaks Character entity references: &code; Numeric character references (e.g. & ) – See Appendix A, (page 1429) – A complete list : A complete list : Strike-out text : Superscript text : Subscript text : Horizontal rule (horizontal line)

Introduction to XHTML 48 contact2.html (1 of 2)

Introduction to XHTML 49 contact2.html (2 of 2)

Introduction to XHTML 50 W3C XHTML Validation Service (1) Validation service ( validator.w3.org ) – Checking a document’s syntax URL that specifies the location of the file Uploading a file to the site validator.w3.org/file-upload.html

Introduction to XHTML 51 W3C XHTML Validation Service (2)

Introduction to XHTML 52 Web Resources validator.w3.org hotwired.lycos.com/webmonkey/00/50/index2a.html wdvl.com/Authoring/Languages/XML/XHTML

Introduction to XHTML 53 Reference Reproduced from the PowerPoints for Internet & World Wide Web How to Program, 3e by Deitel, Deitel and Goldberg © Reproduced by permission of Pearson Education, Inc.