Jozef Goetz, 2012 1 © 2011, 2013 Pearson Education Copyright (c) 2009 Prentice-Hall. All rights reserved.

Slides:



Advertisements
Similar presentations
HTML popo.
Advertisements

Web Development & Design Foundations with XHTML
HTML: HyperText Markup Language Hello World Welcome to the world!
Chapter 2 HTML Basics Key Concepts
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
XHTML Basics.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 3: XHTML Coding © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
 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.
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 1.
Upgrading to XHTML DECO 3001 Tutorial 1 – Part 1 Presented by Ji Soo Yoon 19 February 2004 Slides adopted from
 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.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
Chapter 2: The Client Side: HTML CIS 275—Web Application Development for Business I.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Unit 1 – Developing a Web Page. Objectives:  Learn the history of the Web and HTML  Describe HTML standards and specifications  Understand HTML elements.
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.
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
HTML (HyperText Markup Language)
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.
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.
1 HTML intro The development of HTMLThe development of HTML The transition from HTML to XHTMLThe transition from HTML to XHTML XHTML syntax, tags, and.
1.  Describe the anatomy of a web page  Format the body of a web page with block-level elements including headings, paragraphs, lists, and blockquotes.
Jozef Goetz, © 2009 Pearson Education Copyright (c) 2009 Prentice-Hall. All rights reserved.
Website Development & Management Creating Web Pages CIT Fall Instructor: John Seydel, Ph.D.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer Foundations: Using XHTML Chapter 2 Key Concepts.
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.
HTML: Hyptertext Markup Language Doman’s Sections.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Jozef Goetz, © 2011, 2014 Pearson Education Copyright (c) 2009 Prentice-Hall. All rights reserved. Expanded by J. Goetz, 2015.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Introduction to XHTML 1 Chapter 4 Introduction to XHTML: Part 1 Reference From: Internet & World Wide Web: How to Program Deitel, Deitel & Goldburg.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2- part 2 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
INT222 – Internet Fundamentals
NOTEPAD++ Lab 1 1 Riham ALSmari. Why Notepad++ ?  Syntax highlighting  Tabbed document interface  Zooming  Indentation code  Find and replace over.
Lesson 5. XHTML Tags, Attributes and Structure XHTML Basic Structure head and body titles Paragraph headings comments Document Presentation Manipulating.
HTML Basics.
Web Development & Design Foundations with HTML5 8th Edition
XHTML Basics.
Introduction to XHTML.
Chapter 4 - Introduction to XHTML: Part 1
XHTML Basics.
XHTML Basics.
Marking Up with XHTML Tags describe how a web page should look
Introduction to HTML- Basics
XHTML Basics.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
XHTML Basics.
Basics of Web Design Chapter 2 HTML Basics Key Concepts
Lesson 2: HTML5 Coding.
Basics of Web Design Chapter 2 HTML Basics Key Concepts
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

Jozef Goetz, © 2011, 2013 Pearson Education Copyright (c) 2009 Prentice-Hall. All rights reserved.

Jozef Goetz, Learning Outcomes  In this chapter, you will learn about:  The development of HTML  The transition from HTML to XHTML  XHTML syntax, tags, and document type definitions  The anatomy of a web page  Formatting the body of a web page  Formatting the text on a web page  Physical and logical style tags  Special Characters  Connecting Web pages using hyperlinks

Jozef Goetz, What is HTML?  The World Wide Web is composed of files containing Hypertext Markup Language (HTML)  HTML is based on SGML Standard Generalized Markup Language  Describes the general structure of the document  HTML describes the Structure of a Page  It defines a set of common styles for Web pages  headings  paragraphs  lists  tables  and more  Each of these common styles has a tag associated with it to define the element  HTML  Made up of tags and attributes  The set of markup symbols or codes placed in a file intended for display on a Web browser page.

Jozef Goetz, What HTML Is -- and What It Isn’t Heading Paragraph Bulleted List Paragraph

Jozef Goetz, What is HTML?  The text of the page  Adds special code (tags - formatting instructions) around words and paragraphs  each individual markup code is referred to as an element or tag. Each tag has a purpose.  Tags are enclosed in angle brackets, " " symbols – referred to as container tags  Most tags come in pairs; an opening tag and a closing tag.  horizontal line: is a stand-alone or self-contained tag and doesn’t have a closing tag.

Jozef Goetz, 2012 HTML Whereas the text is the actual information contained in a page, the tags define the appearance of the document.  Every HTML tag is a name followed by an optional list of attributes, all enclosed between less-than and greater-than symbols ( ).  An attribute, if present, is followed by an equals sign and the value of the attribute.  Some tags can be used alone; others must be used in pairs.  Those that are used in pairs are called beginning and ending tags.  The beginning tag can have attributes and values and starts with the name of the tag.  The ending tag cannot have attributes or values but must have a slash before the name of the tag.

Jozef Goetz, 2012 HTML  The browser makes a decision about the structure of the text based on the tags, which are embedded into the text.

Jozef Goetz, What is HTML?  HTML tags that indicate:  page elements  structure  formatting  hypertext links  HTML tags are not case sensitive  XHTML tags are case sensitive  all tags and attributes must be written in lowercase  browsers ignore:  extra spaces  tabs  returns  tags are the only way to format an HTML page

Jozef Goetz, What HTML Is  The individual browsers map the tag to how it will be viewed  different browsers can display the same tag element in radically different ways  what this means is that a Web page may look perfect on your system and be unreadable on someone else's  In addition to the HTML tags defined in the various versions of HTML:  browser vendors defined their own browser-specific extensions

Jozef Goetz, What is HTML?  The World Wide Web is composed of files containing Hypertext Markup Language (HTML)  Scripting language that instructs a Web browser how to display a Web page  Less powerful than other computer languages  Runs within a browser, not stand-alone  One of the version: HTML 4.01  Is being replaced with XHTML

Jozef Goetz, What HTML Is -- and What It Isn’t  A Brief History of HTML Tags  HTML 2.0 HTML 2.0  HTML 2.0 (RFC 1866) was developed by the IETF's HTML Working Group, which closed in  It sets the standard for core HTML features based upon current practice in  HTML 3.2 HTML 3.2  W3C's recommendation for HTML which represented the consensus on HTML features for  HTML 3.2 added widely-deployed features such as –tables, –applets, –text-flow around images, –superscripts and –subscripts,  while providing backwards compatibility with the existing HTML 2.0 Standard.HTML 2.0 Standard

Jozef Goetz, What HTML Is -- and What It Isn’t  HTML 4.0 HTML 4.0  First released as a W3C Recommendation on 18 December  A second release was issued on 24 April 1998 with changes limited to editorial corrections.  This specification has now been superseded by HTML HTML 4.01  HTML 4.01 HTML 4.01  The HTML 4.01 Recommendation released on 24th December 1999 fixes a number of bugs in the HTML 4.0 specification.HTML 4.01

Jozef Goetz, HTML Version Structure WML= Wireless Markup Language

Jozef Goetz, HTML 5 p.587  HTML 5  The next version of HTML 4 and XHTML 1 –There are 28 additional tags and a few new techniques, but you won’t be using a completely new mark-up language. –Firefox, Chrome, Safari, and Opera can all use HTML5 today but not Internet Explorer  reasons-why-you-can-use-html5-today/ - The HTML5 Specification Will Never Be Complete reasons-why-you-can-use-html5-today/ 

Jozef Goetz, Markup Languages The relationship between HTML, HTML, and XML  HTML 5

Jozef Goetz, What is XHTML?  The World Wide Web Consortium  sets the standards for HTML and its related languages.  The version of HTML 4.01 is actually XHTML – eXtensible HyperText Markup Language.  XHTML uses the tags and attributes of HTML along with the syntax of XML (eXtensible Markup Language).

Jozef Goetz, Extensible Markup Language (XML) Here's an example of the data in XML: JONES JOHN BROADWAY NEW YORK NY SMITH MABEL ANYSTREET CHICAGO IL 60614

Jozef Goetz, Programs to Help You Write HTML  Many programs available to help create HTML files  3 flavors of editors:  HTML-based text editors  WYSIWYG (What You See What You Get) editors  Combination of HTML-based and WYSIWYG editors Dreamweaver  There are also converters that generate an HTML file from an existing document.  For now use Notepad

Jozef Goetz, What is XHTML and Why Use It?  What is XHTML and Why Use It?  eXtensible HyperText Markup Language.  XHTML is the transition from HTML 4.0 to XML (Extensible Markup Language)  Expected benefits of the transition include: – places specific requirements on documents to ensure they are readable in future browsers, –an improved match to database & workflow applications, –a modular solution to the increasingly disparate capabilities of browsers, –and the ability to cleanly integrate HTML with other XML applications.

Jozef Goetz, XHTML p.591  XHTML was developed by the W3C World Wide Web Consortium to be the reformulation of HTML as an application of XML.  Purpose :  Provides a more structured alternative to non- standard HTML  Provide ways to extend HTML and add new features  Separate content from presentation (>=XHTML 2.0)  XHTML combines  the formatting strengths of HTML and  the data structure and extensibility strengths of XML. –allows for custom tags

Jozef Goetz, What is XHTML and Why Use It?  XHTML Syntax  Use lowercase tags and attributes  Place attribute values in quotes  All container tags must use their opening and closing tags. All tags are enclosed in angle brackets.  Terminate all non-empty single elements –add the closing slash (/) preceded by a space just before the ending greater symbol than (>) and become and  Tags shouldn’t be overlapped (html and xhtml) –nested -- Bold and Italic –overlapping -- Bold and Italic

Jozef Goetz, XML Declaration  An XML document must be well-formed i.e. adheres to the syntax rules  Use lowercase  Use opening and closing tags  Close stand-alone tag with special syntax  XML documents begin with an XML declaration as a directive. The basic form of this directive is (p.579):  UTF-8 a form of Unicode

Jozef Goetz, Document Type Definition (DTD)  W3C Recommendation: Use a Document Type Definition DTD to identify the type of markup language used in a web page (p.567): 1. XHTML 1.0 Transitional This is the least strict specification for XHTML 1.0. It allows the use of both Cascading Style Sheets and traditional formatting instructions such as fonts. We will use this for most of our coding in this text <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " 2. XHTML 1.0 Strict requires exclusive use of CSS, doesn’t allow any deprecated elements 3. XHTML 1.0 Frameset

Jozef Goetz, XHTML 1.0 Transitional DTD This DTD module is identified by the PUBLIC and SYSTEM identifiers: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" SYSTEM " <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" gives access to the DTD definition Document Type Definition DTD tag commonly called the DOCTYPE We will use mainly XHTML 1.0 version sometimes XHTML 1.1

Jozef Goetz, Versions of XHTML  Strict (XHTML 2.0)  Must follow complete XML coding rules  Must separate content from presentation  Presentation via Cascading Style Sheets (CSS)  Transitional (XHTML 1.0, 1.1)  Reformulation of HTML 4.01  Presentation and content tags exist  Frameset  Enable window-in-a-window effect

Jozef Goetz, Document Type Definition (DTD)  The document type declaration names the Document Type Definition (DTD) in use for the document.  Declares the document type  Required in XHTML  HTML 4.01 specifies three DTDs:   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "

Jozef Goetz, namespace xmlns=  The location of the documentation for the elements being used  This is an XML namespace defined in the XHTML™ 1.0: The Extensible HyperText Markup Language specification, and  is shared across XHTML Family document types

Jozef Goetz, Head & Body Sections  Head Section (description) -- Contains information that describes the web page document. …head section info goes here  Body Section (contents) -- Used for text and tags that do show directly on the web page. …body section info goes here

Jozef Goetz, Whole XHTML with and tags <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " transitional.dtd">.... Header info goes here.... Body info goes here

Jozef Goetz, The Title p.590  tag  gives a page a title  used in bookmarks  used by search engines  appears in browser title bar  goes inside the page header ( )

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. HTML Code in Notepad and Browser Results Body goes in content area of browser Title goes in Title bar of browser

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Saving an XHTML File from Notepad  By default, files from Notepad are saved with a.txt extension  If you try to save as filename.htm, then the saved file name will be filename.htm.txt  You can avoid this by either:  Making sure that the Save As Type entry is set as All Files instead of *.txt or  Saving with the name in quotes, like this: "filename.htm"

Jozef Goetz, Checkpoint 2.1 p.612  1. Describe the origin, purpose, and features of HTML.  Developed by Tim Berbers-Lee at CRN using SGML.  Is set of markup symbols or codes placed in a file intended for display on a Web browser.  Each markup code is referred to an element ( or tag)  2. Describe the software needed to create and test web pages.  3. Describe the purpose of the header and body sections of a web page.

Jozef Goetz, Lab Excercises: Hello World Hands On Practice 2.1: Hello World!

Jozef Goetz, HTML tag attributes  The tag can be used to set attributes (properties) for entire Web page, such as  Background color  Background image  Text color and  Link color  bgcolor  Configures the background color of a web page // dark navy blue  text Configures the color of the text on the web page  Check the XHTML Reference p.582 in the textbook for more body tag attributes

Jozef Goetz, Headings  Heading tags  Six levels:,,,,, and  used to divide sections -- similar to a book  displayed either in larger or bolder text  can be centered, underlined, capitalized  common to use a heading to duplicate the title

Jozef Goetz, Heading Tags Heading Level 1 Heading Level 2 Heading Level 3 Heading Level 4 Heading Level 5 Heading Level 6 is largest is smallest

 2002 Prentice Hall. All rights reserved. Outline 38

Jozef Goetz, HTML tag  Enter/Return key does not provide this in HTML documents  Can use paragraph tag …paragraph goes here  Used to group sentences and sections of text together.  Text that is contained by and tags will have a blank line above and below it.

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Closing Container Tags  HTML rules require all tags have closing tags  Opening tag has tag code:  e.g.  Closing tag has forward slash in front of code  e.g.  Content placed between opening and closing tags  CONTENT  Browsers are forgiving, but HTML rules are strict

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Effects of Tags tag inserts white space and separates lines of text Without tag, Enter/Return has no effect on browser display HOP

Jozef Goetz, Body and Text Basics  Structural elements, called  block-level tags (elements) control blocks of the text such as  Heading tags, …,  Paragraph -   Tags that effect individual section of text called text-level tags

Jozef Goetz, Lab Excercises: headings Hands On Practice

Jozef Goetz, Self-contained tag  Line Break tag  the line break tag in HTML has no corresponding closing tag.  Many empty tags in HTML (i.e. tags with no text content) have no closing tags  to make an opening tag in XHML also be a closing tag, by placing a slash before the end bracket.  Stand alone tag in HTML …text goes here This starts on a new line….  Used to force a new line when the text on the web page document is displayed by a browser.

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Attributes  Most tags can have attributes  Attribute is:  Information in the opening tag  Additional information that defines a tag  Attribute syntax:  attributename = “value”  Attribute – value pair

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. The align Attribute  Specifies how text within the paragraph should be aligned  Options include: left, center, right, justify  Example:  CONTENT

Jozef Goetz, HOP 2.4 in HTML

Jozef Goetz, HOP 2.4 in HTML HOP 2.4:

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Effects of align attribute Effect of

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Effects of Headings Tags Dr. Know-It-All Recommendations Upcoming Books HOP 2.4

Jozef Goetz, HTML tag  Preformatted Text tag  The preformatted text tag pre serves your formatting and displays the text in a fixed-width or monospace font. …text goes here Line breaks and formatting are preserved  NOTE: Usually is used for listing programming or scripting code

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Blockquote Tag – HOP 2.5  Used to indent a block of text for special emphasis. …text goes here  Indents contained text  Indentation from left and right margins and a line break is placed before and after the text  Nest blockquote tags to increase indentation

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Effects of Blockquote Tag tag causes this indentation Nested causes more indentation HOP 2.3 – 2.5

Jozef Goetz, HTML List Basics  Unordered List –ul  Ordered List - ol  Definition List - dl

Jozef Goetz, Lists  List Tags Common Elements  opening and closing tag 1.unordered list and HOP 2.6 –list items 2.ordered list and HOP 2.7 –list items 3.definition list and HOP 2.8 –definition term and –definition data  list items have their own tag

Jozef Goetz, Unordered Lists Used to display information in bullet points

Jozef Goetz, 2012 HTML Unordered List Example TCP IP HTTP FTP

Jozef Goetz, HTML Unordered List  HTML 3.2 provided ways to customize unordered lists  They have been deprecated in HTML 4.0 in favor of using style sheets  Contains the unordered list  The type attribute customizes unordered lists  the type attribute has 3 possible values –disc - default –square, –circle  the type attribute is used in the tag  Contains an list item

Jozef Goetz, Ordered Lists Used to convey information in an ordered fashion

Jozef Goetz, HTML Ordered List  Contains the ordered list  Two main ways to customize ordered lists  how they are numbered –type attribute default is numerals: 1, 2,…  the number with which the list starts –start attribute  Ex:  Contains an list item

Jozef Goetz, Ordered List  Type attribute can take one of five values  “1” Specifies standard Arabic numerals –1, 2, 3, 4,5  “a” Specifies lowercase letters –a, b, c, d, e  “A” Specifies uppercase letters –A, B, C, D, E  “i” Specifies lowercase Roman numerals –i, ii, iii, iv, v  “I” Specifies uppercase Roman numerals –I, II, III, IV, V

Jozef Goetz, Ordered List  Both the start and type attributes are used in the tag  start=“1” is the default value  type=“1” is the default value  By using the value attribute in the tag, numbering can be reassigned at any point Step 5 and …=>  So, it will start from MCXI.

Jozef Goetz, HTML Definition List  Useful to display a list of terms an definitions or a list of FAQ and answers  tag Contains the definition list  tag Contains a defined term  tag Contains a data definition HOP 2.5

Jozef Goetz, 2012 HTML Definition List Example IP Internet Protocol TCP Transmission Control Protocol

Jozef Goetz, Definition Lists HOP 2.8

 2002 Prentice Hall. All rights reserved. Outline 66 list.html (1 of 3) Nested and Ordered Lists

 2002 Prentice Hall. All rights reserved. Outline 67 list.html (2 of 3) Nested and Ordered Lists

 2002 Prentice Hall. All rights reserved. Outline 68 list.html (3 of 3) Nested and Ordered Lists

Jozef Goetz, Comments  Comment  It’s a good rule of thumb not to include “--”, “ ”, or HTML tags within comments

Jozef Goetz, HTML Logical Style Tags  Indicate the logical ( general ) style used to display the text in between the container tags.  Common Logical Style Tags p.46   To cause text to be emphasized or to "stand out" from surrounding text. Usually displayed in bold. This is important   To cause text to be emphasized in relation to other text on the page. Usually displayed in italics. Please note

Jozef Goetz, HTML Physical Style Tags  Provide specific font instructions for the browser  Logical Style tags are preferred by the W3C  Physical Style tags are covered here b/c many Web pages use them  They provide specific fonts instructions for the browser  are discussed because some web developers still use them  Common Physical Style Tags   To display as bold text This is important   To display text in italics Please note  Logical Style Tags provides a wider range of Web access

Jozef Goetz, HTML Special Characters  Used to display special characters such as quotes, copyright symbol, etc.  Character entity references (in the form &code; )  Numeric character references (e.g. & ) Numeric Code Character Code &#169© © &#60 < < &#62 > > &#38& &  See the Special Characters section textbook for a detailed list – appendix B p.595 HOP 2.9

 2002 Prentice Hall. All rights reserved. Outline 73 contact2.html (1 of 2)

 2002 Prentice Hall. All rights reserved. Outline 74 contact2.ht ml (2 of 2)

Jozef Goetz, 2012 HTML tag  The tag  A container tag  Used to create a specially formatted division or area of a web page.  It can be used to format that area and places a line break before and after the division.  Use the tag when you need to format an area that is separated from the rest of the web page by line breaks.  The tag is also useful to define an area that will contain other block-level tags (such as,,, or ) within it.

Jozef Goetz, 2012 tag HOP

Jozef Goetz, HTML tag  The anchor element  href (hypertext reference)  Indicates the target – destination page or location of the link  Text between the and is displayed on the web page. Contact Us  href Attribute  Indicates the file name or URL Web page document, photo, pdf, etc.

Jozef Goetz, Creating Links Opening Tag Closing Tag Text that will be displayed URL

Jozef Goetz, Absolute and relative links  Hyperlinks – clickable areas take the viewer to another location  Uniform Resource Locator (URL) – the Web address of a resource  Relative URL – local file or folder (it doesn’t include the  Absolute URL – address on another Web server  Typically begins with the  HTTP – hypertext transfer protocol  Web server – the computer hosting a Web site

Jozef Goetz, HTML tag  Absolute link  Link to other Web sites Yahoo  Relative link  Link to pages on your own site Home

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. Effects of, href, and title Tool tip generated by title="Home Page Link" Displayed text generated by text between the tag and the tag <a href=“ " title="Home Page Link">Click here to go to our home page! Mouse pointer changes when hovered over the link When user clicks, the page opened will be based on href=“ " title: Provides text that can appear in a tool tip when the mouse hovers over the link

Jozef Goetz, HTML Links using the tag  Automatically launch the default mail program configured for the browser  If no browser default is configured, a message is displayed Hands-On Practice 2.13 – an link

Jozef Goetz, Hyperlinks Hands-On Practice 2.12 – the anchor tag Create folder mywebsite containing 3 files as follows (see next slide for the solution):

Jozef Goetz, background.html HOP 2.12 favorites.html HOP 2.12

Jozef Goetz, Copyright (c) 2006 Prentice-Hall. All rights reserved. The Character Entity  character entity – a code in HTML that produces a symbol  Begins with & symbol and ends with a semicolon  Not a tag or attribute  represents a space character  create space in Web page  Must be all lowercase characters  Putting spaces in HTML document does not create spaces in Web page !

Jozef Goetz, Checkpoint Describe the purpose of special characters.  Entity ch-rs, displays items such as quotation marks,, the copyright symbol etc. 1.Describe when to use an absolute link. Is the http protocol used in the href value? Yes, it used. 2.Describe when to use a relative link. Is the http protocol used in the href value? No, it isn’t used. p.613

Jozef Goetz, 2012 Writing Valid HTML  Check your code for syntax errors  Benefit:  Valid code  more consistent browser display  W3C HTML Validation Tool  Hands-On Practice 2.14 – validate a Website

Jozef Goetz, Web Resources      hotwired.lycos.com/webmonkey/00/50/index2a.html  wdvl.com/Authoring/Languages/XML/XHTML 

Jozef Goetz, Summary  This chapter provided an introduction to HTML.  It began with  an introduction to the XHTML and HTML,  continued with the anatomy of a web page, and  introduced inline and block-level formatting, and  demonstrated the HTML techniques used to create hyperlinks.  You will use these skills over and over again as you create Web pages.

Jozef Goetz, 2012 Home Project – JavaJam Cofee House

Jozef Goetz, 2012 Home Project – Fish Creek Animal Hospital