 2008 Pearson Education, Inc. All rights reserved. 1 4 4 Introduction to XHTML.

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

WeB application development
Website Design.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
 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.
Marking Up With Html: A Hypertext Markup Language Primer
 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.
Lecture 12. A Very Brief Introduction to HTML and XHTML Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell Exploring.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Basics of HTML.
Creating a Simple Page: HTML Overview
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.
 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 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.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Web Development University of Khartoum. Web Development Web Programming Web Design University of Khartoum.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
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.
Introduction to HTML. What is HTML? Hyper Text Markup Language (HTML) is a language for describing web pages. HTML is not a programming language, it is.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 8 1 Creating Effective Web Pages Creating HTML Documents Tutorial 8.
Just Enough HTML How to Create Basic HTML Documents.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML Links HTML uses a hyperlink to another document on the Web.
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.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
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.
Introduction to XHTML/HTML5 (part 1) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web (multiple editions)
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
HTML5 Overview of Lecture  Why learn XHTML?  Good Programming Practices  Basic HTML Tags  Headings  Creating Links  Adding an Image  Linking Through.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
 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.
Chapter 1: Introduction to XHTML (part 1)
Introduction to XHTML.
Chapter 4 - Introduction to XHTML: Part 1
WEBSITE DESIGN Chp 1
4 Introduction to XHTML.
Marking Up with XHTML Tags describe how a web page should look
1 Introduction to XHTML.
Introduction to HTML- Basics
Introduction to HTML.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Presentation transcript:

 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML

 2008 Pearson Education, Inc. All rights reserved. 2 OBJECTIVES In this chapter you will learn:  To understand important components of XHTML documents.  To use XHTML to create web pages.  To add images to web pages.  To create and use hyperlinks to navigate web pages.  To mark up lists of information.  To create tables with rows and columns of data and control table formatting.  To create and use forms to get user input.  To make web pages accessible to search engines using tags.

 2008 Pearson Education, Inc. All rights reserved Introduction 4.2Editing XHTML 4.3First XHTML Example 4.4 W3C XHTML Validation Service 4.5 Headings 4.6 Linking 4.7 Images 4.8 Special Characters and Horizontal Rules 4.9 Lists 4.10 Tables 4.11 Forms 4.12 Internal Linking 4.13 meta Elements 4.14 Web Resources

 2008 Pearson Education, Inc. All rights reserved Introduction XHTML (Extensible HyperText Markup Language) – markup language for creating web pages Based on HTML (HyperText Markup Language) – legacy technology of the World Wide Web Consortium (W3C) XHTML 1.0 – Allows only a document’s content and structure to appear in a valid XHTML document, and not its formatting – Formatting is specified with Cascading Style Sheets

 2008 Pearson Education, Inc. All rights reserved Editing XHTML A machine that runs a specialized piece of software called a web server stores XHTML documents

 2008 Pearson Education, Inc. All rights reserved. 6 Good Programming Practice 4.1 Assign filenames to documents that describe their functionality. This practice can help you identify documents faster. It also helps people who want to link to a page, by giving them an easy-to-remember name. For example, if you are writing an XHTML document that contains product information, you might want to call it products.html.

 2008 Pearson Education, Inc. All rights reserved First XHTML Example In XHTML, text is marked up with elements delimited by tags that are names contained in pairs of angle brackets – Every XHTML document contains a start tag and an end tag Some elements may contain attributes that provide additional information about the element Comments in XHTML always begin with. The browser ignores all text inside a comment

 2008 Pearson Education, Inc. All rights reserved First XHTML Example (Cont.) Every XHTML document contains a head element which generally contains: – A title – A body element head element – generally is not rendered in the display window

 2008 Pearson Education, Inc. All rights reserved First XHTML Example (Cont.) The title element: – Names a web page – Usually appears in the colored bar (called the title bar) at the top of the browser window – Is the text identifying a page when users add your page to their list of Favorites or Bookmarks The body element: – Contains the document’s content, which may include text and tags

 2008 Pearson Education, Inc. All rights reserved First XHTML Example (Cont.) All text placed between the and tags forms one paragraph

 2008 Pearson Education, Inc. All rights reserved First XHTML Example (Cont.) XHTML documents delimit an element with start and end tags – A start tag consists of the element name in angle brackets (e.g., ) – An end tag consists of the element name preceded by a forward slash ( / ) in angle brackets (e.g., ) Many start tags have attributes that provide additional information about an element – Each attribute has a name and a value separated by an equals sign ( = )

 2008 Pearson Education, Inc. All rights reserved. 12 Fig. 4.1 | First XHTML example. Creates a head element Creates a title element, which contains the text Welcome Creates a p element within the body, which displays welcome text XHTML comments, not interpreted by the browser

 2008 Pearson Education, Inc. All rights reserved. 13 Good Programming Practice 4.2 Place comments throughout your markup. Comments help other programmers understand the markup, assist in debugging and list useful information that you do not want the browser to render. Comments also help you understand your own markup when you revisit a document to modify or update it in the future.

 2008 Pearson Education, Inc. All rights reserved. 14 Common Programming Error 4.1 Not enclosing attribute values in either single or double quotes is a syntax error. However, some web browsers may still render the element correctly.

 2008 Pearson Education, Inc. All rights reserved. 15 Common Programming Error 4.2 Using uppercase letters in an XHTML element or attribute name is a syntax error. However, some web browsers may still render the element correctly.

 2008 Pearson Education, Inc. All rights reserved. 16 Good Programming Practice 4.3 Indenting nested elements emphasizes a document’s structure and promotes readability.

 2008 Pearson Education, Inc. All rights reserved. 17 Common Programming Error 4.3 XHTML does not permit tags to overlap—a nested element’s end tag must appear in the document before the enclosing element’s end tag. For example, the nested XHTML tags hello cause a syntax error, because the enclosing head element’s ending tag appears before the nested title element’s ending tag.

 2008 Pearson Education, Inc. All rights reserved. 18 Good Programming Practice 4.4 Use a consistent title -naming convention for all pages on a site. For example, if a site is named “Bailey’s Website,” then the title of the contact page might be “Bailey’s Website - Contact.” This practice can help users better understand the website’s structure.

 2008 Pearson Education, Inc. All rights reserved W3C XHTML Validation Service XHTML documents that are syntactically correct are guaranteed to render properly XHTML documents that contain syntax errors may not display properly Validation services (e.g., validator.w3.org ) ensure that an XHTML document is syntactically correct

 2008 Pearson Education, Inc. All rights reserved. 20 Error-Prevention Tip 4.1 Most current browsers attempt to render XHTML documents even if they are invalid. This often leads to unexpected and possibly undesirable results. Use a validation service, such as the W3C, to confirm that an XHTML document is syntactically correct.

 2008 Pearson Education, Inc. All rights reserved Headings XHTML provides six headings (h1 through h6) for specifying the relative importance of information – Heading element h1 is considered the most significant heading and is rendered in the largest font – Each successive heading element (i.e., h2, h3, etc.) is rendered in a progressively smaller font

 2008 Pearson Education, Inc. All rights reserved. 22 Portability Tip 4.1 The text size used to display each heading element can vary significantly between browsers. In Chapter 5, we discuss how to control the text size and other text properties.

 2008 Pearson Education, Inc. All rights reserved. 23 Look-and-Feel Observation 4.1 Placing a heading at the top of every XHTML page helps viewers understand the purpose of each page.

 2008 Pearson Education, Inc. All rights reserved. 24 Look-and-Feel Observation 4.2 Use larger headings to emphasize more important sections of a web page.

 2008 Pearson Education, Inc. All rights reserved. 25 Fig. 4.2 | Heading elements h1 through h6. Creates six headings, each with decreasing significance

 2008 Pearson Education, Inc. All rights reserved Linking A hyperlink references or links to other resources, such as XHTML documents and images Web browsers typically underline text hyperlinks and color them blue by default

 2008 Pearson Education, Inc. All rights reserved Linking (Cont.) Users can insert links with the a (anchor) element. – The href attribute specifies the resource (e.g., page, file, e- mail address) being linked – Anchors can link to an address using a mailto: URL When a user clicks this type of anchored link, most browsers launch the default program (e.g., Outlook Express) to initiate an message addressed to the linked address

 2008 Pearson Education, Inc. All rights reserved Linking (Cont.) The strong element typically causes the browser to render text in a bold font

 2008 Pearson Education, Inc. All rights reserved | Linking to other web pages. Creates anchor elements that link to the URL specified in the href attribute

 2008 Pearson Education, Inc. All rights reserved. 30 Fig. 4.4 | Linking to an address (Part 1 of 2). Hyperlink that creates a message to the address with the computer’s default program

 2008 Pearson Education, Inc. All rights reserved. 31 Fig. 4.4 | Linking to an address (Part 2 of 2).

 2008 Pearson Education, Inc. All rights reserved. TBC in Part 2 32