Creating HTML 5 Documents (The Basics). Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create.

Slides:



Advertisements
Similar presentations
Web Development & Design Foundations with XHTML
Advertisements

Elder L. Lionel Kendrick Of the First Quorum of the Seventy It has been from the beginning and it will be till the end that the natural man will have a.
Chapter 2 HTML Basics Key Concepts
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
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.
Markup Languages Controlling the Display Of Web Content.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
 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 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.
Chapter 14 Introduction to HTML
Introducing HTML & XHTML:. Goals  Understand hyperlinking  Understand how tags are formed and used.  Understand HTML as a markup language  Understand.
Computer Sciences Department
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
XML introduction to Ahmed I. Deeb Dr. Anwar Mousa  presenter  instructor University Of Palestine-2009.
Week 1.  Phillip Chee   Ext.1214 
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
HTML BASICS Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
HTML (HyperText Markup Language)
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
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.
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
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.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer Foundations: Using XHTML Chapter 2 Key Concepts.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Department of Information Technology Chapter 8 - Creating Hypertext links Lecturer: Ms Melinda Chung.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
A Basic Web Page. Chapter 2 Objectives HTML tags and elements Create a simple Web Page XHTML Line breaks and Paragraph divisions Basic HTML elements.
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,
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML: Hyptertext Markup Language Doman’s Sections.
Copyright © Osmosys O S M O S Y SO S M O S Y S D e p l o y i n g E x p e r i e n c e & E x p e r t i s e™ HTML Training.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Basic Document Structure.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Objective: To describe the evolution of the Internet and the Web. Explain the need for web standards. Describe universal design. Identify benefits of accessible.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Slide 1 Graphics (Characteristics 1) Images have various characteristics that affect performance Size (number of pixels) – Large images can be several.
Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
CHAPTER TWO HTML TAGS. 1.Basic HTML Tags 1.1 HTML: Hypertext Markup Language  HTML stands for Hypertext Markup Language.  It is the markup language.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Tutorial #1 Using HTML to Create Web Pages. HTML, XHTML, and CSS HTML – HyperText Markup Language The tags the browser uses to define the content of the.
Introduction to HTML Dave Edsall IAGenWeb County Coordinator’s Conference June 30, 2007.
HTML Basics.
HTML TEXT.
LINKS.
WEBSITE DESIGN Chp 1
Basic HTML Document Structure
Introducing HTML & XHTML:
Graphics (Characteristics 1)
Basic HTML and Embed Codes
Introduction to HTML- Basics
Introduction to HTML.
Presentation transcript:

Creating HTML 5 Documents (The Basics)

Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal (strict) version of HTML Extend the language to include semantic elements and standard media elements to play video, audio, … Adds what’s missing instead of fixing what’s wrong I’ll mention both

Slide 3 What’s the Status of HTML5 It’s pretty much supported by IE 9+, and current versions of Chrome At this point, it’s a living language and other software is growing to support it There is a cohesive API that goes along with the language Much more about programming later We will be working in HTML5 this semester but I’ll talk about both here

Slide 4 XHTML and XML Simply put, XHTML is a specific XML vocabulary Document Type Definitions (DTDs) are used to create XML vocabularies There are many vocabularies in addition to XHTML SOAP, XSLT, XPATH, and many more Although not mentioned in the book, schemas are used for document validation

Slide 5 DTDs (Introduction) Document Type Definition (DTD) files are used to validate XML documents That is, they describe the elements allowed in an XML document, and the order in which those elements must appear Older versions of HTML and XHTML used physical DTDs. HTML5 does not

Slide 6 Hooking Up the DTD The declaration is used to reference an “external” DTD There are DTDs to validate XHTML There is no physical DTD for HTML5 but we use the declaration to keep everything happy

Slide 7 Declaration (Syntax XHTML) <!DOCTYPE html type “public identifier” “URL” html denotes that the root node of the document to follow is HTML type can be PUBLIC or SYSTEM PUBLIC DTDs are available on the Web PUBLIC identifier is magical URL contains the location of the DTD.NET fills all of this in for you

Slide 8 (Example 1) Sample XHTML

Slide 9 XHTML (Types / Versions) Transitional – for browsers that don’t support CSS Old style elements are supported along with CSS Strict - for browsers that do support CSS Deprecated elements are not supported Most of these are formatting related Frameset – for frames 1.1 It’s really modularized strict

Slide 10 HTML5 Document DTD The DTD has been reduced down to And does not physically exist

Slide 11 XHTML and HTML5 Validation Visual Studio.NET automatically validates XHTML and HTML5 documents as you edit them Note that most browsers WILL render invalid XHTML and HTML5 documents I WILL NOT accept them though

Slide 12 Document Validation There is a validator at It validates the following document types Check your documents before turning them in

Slide 13 Document Validation Select the file, encoding and document type

Slide 14 Document Validation And see the results

Slide 15 Principles of HTML5 Don’t break the Web Everything “before” HTML5 is valid Pave the Cowpaths Adds standards for many things (multimedia) where there were no standards before Be practical Changes should have a payoff

Slide 16 HTML5 Semantics We have all heard of the semantic Web HTML5 introduces semantic language elements Formatting elements are now semantic elements We introduce elements like,,,, and that have meaning beyond just formatting These semantics help with assistive technologies too

Slide 17 Elements (Syntax) Elements have starting tags and ending tags Starting tags appear in <> characters as in Ending tags appears in characters as in When there is no data a shorthand notation can be used as in (line break)

Slide 18 XHTML Elements and Attributes Elements are roughly categorized into two types Block-level elements define the structure of a page Paragraphs and tables Semantic elements such as Inline elements are used mostly for formatting Inline elements appear inside of a block-level element Semantic elements are favored over older formatting elements We will talk about different elements as we use them

Slide 19 Document Attributes Attributes are used to further configure an element Some attribute names are common to almost all elements ID is usually a unique identifier Some attribute names are unique to a specific element href applies only to anchor elements (hyperlinks)

Slide 20 Document Attribute (Syntax) Attributes appear in an opening element tag They appear as key/value pairs An equal sign separates keys and values A space separates multiple key/value pairs Values are quoted Both single and double quotation marks are allowed

Slide 21 HTML5 Attribute (Example) Example: an attribute named id with a value of FirstHeader in the element The element has no content The following element has content Header Content

Slide 22 Structural Elements must be the root element must appear next nested inside must appear next nested inside and follow These elements are optional in HTML5 but required in XHTML

Slide 23 The Element (1) It’s the document header and contains information about the Web page

Slide 24 The Element (2) Child elements - the base URL for relative references - contains a link to an external Cascading Style Sheet or other resource - describes document metadata used by search engines among other things

Slide 25 The Element (3) - contains scripting language commands More later when we talk about JavaScript - defines style information More about this when we talk about CSS - contains the text that appears in the title bar of the browser

Slide 26 The Document Body The appears after the It contains the document content that is rendered by a browser

Slide 27 Basic Body Elements (1) … are heading tags Text appears between the tag This is a heading inserts a paragraph inserts a line break inserts a horizontal line (rule)

Slide 28 The Anchor Element (Introduction) The Anchor element is used to create links to Another Web site Pages within the current Web site A position on a Web site page

Slide 29 The Anchor Element (Syntax) The href attribute contains the target URL It can contain an absolute or relative reference (more in a minute) The id attribute is used to create a bookmark in a document Also referred to as a named anchor Changed in HTML5 to id from name

Slide 30 The Anchor Element (Syntax) The markup in the element contains the ‘user visible link’ The rel attribute describes the semantic relationship of the link Replaces the rev attribute The new download attribute contains a file name to be downloaded The new type argument contains the MIME type of the linked document types/media-types.xhtml types/media-types.xhtml

Slide 31 The Anchor Element (Link Example) A link to UNR The user sees the text UNR Note that the visible link appears as the element content (UNR) UNR

Slide 32 Bookmarks (Introduction) tags are used to create links to a location within a (the same) document It’s a two-step process Create an element using the name or id attribute id is understood by newer browsers name is deprecated

Slide 33 Bookmarks (Creating the Anchor) Create the anchor by setting the id attribute of any tag: IS 360

Slide 34 Bookmarks (Referencing the Anchor) Reference the anchor using the tag href contains the bookmark’s id preceded by the # symbol Example: Top

Slide 35 Bookmarks (Best Practices) Use both name and id to support obsolete browsers

Slide 36 The Element (Introduction) It’s used to Pull images into HTML documents when the documents are rendered Images are stored separate from the HTML file referencing the image When using thumbnails, you are really using two images Alternate text can appear if the image is unavailable (accessibility)

Slide 37 The Element (Attributes) src - the absolute or relative URL containing the image alt – Text to display in place of the image file (Use to improve accessibility) width – width of the image (in pixels) height – height of the image (in pixels)

Slide 38 The Element (Notes) If you don’t set the height and width, the image will be rendered at its original size If you set the height and width, the image will be scaled as needed The image might be stretched I won’t use the deprecated formatting attributes favoring CSS

Slide 39 The Element (Examples) Insert an image using a relative reference The current directory

Slide 40 Making an Image into a Link Simply embed the tag into the content of the tag as in <img src="NevadaRGB.gif" alt="Nevada N" height="100px", width="200px" />

Slide 41 The Purpose of a URL We use Uniform Resource Locators to Send requests to Web servers Send information about the request

Slide 42 The Format of a URL /stock_quote?Symbol=msft Protocol Domain moneycentral.msn.com Directory detail/stock_quote Query string ?Symbol=msft

Slide 43 Absolute and Relative References Links may be created in two ways Absolute links contain the protocol, domain, and directory Relative links are created “relative” to the current pages Special character patterns allow you to navigate the directory herarchy

Slide 44 Relative References (Examples) Foo.htm The file named foo.htm in the current folder Child/foo.htm The file named foo.htm in the folder named Child../foo.htm The file named foo.htm in the parent folder

Slide 45 File Names (Best Practices) Beware that some Web servers are case- sensitive when it comes to file names Use a constant scheme for creating files (Pascal case or Camel case) Spaces are problematic for file names %20 anyone

Slide 46 Comments Comments appear between the characters Comments can appear on multiple lines Comments cannot be nested The end of comment pattern cannot appear within a comment

Slide 47 Introduction to Lists (1) Lists are of three types Ordered (numbered) lists are marked with the tag Unordered (bulleted) lists are marked with the tag List items appear inside the above tags The type attribute controls the symbol displayed This attribute is valid only for XHTML Transitional Lists can be nested

Slide 48 Ordered List (Example) First Second Third Fourth

Slide 49 Unordered List (Example) First Second Third Fourth

Slide 50 Definition Lists (Introduction) The element marks a definition list Again, these are newer semantic tags The inner and element pairs mark the term and its value

Slide 51 Definition Lists (Example) Term Definition of Term Second Term Definition of Second Term

Slide 52 Entity References We often need to Insert special meta-characters into XHTML documents Named entities Insert symbols © Numbered Entities

Slide 53 Inserting Special Characters (Named Entities) a complete list appears at non-breaking space ¢ cent symbol £ British Pound © copyright symbol ® registered trademark < less than > greater than & ampersand " double-quotation mark

Slide 54 Inserting Unicode Symbols It’s possible to specify a UNICODE code point as a decimal or hexadecimal number (where d is a decimal or hexadecimal value ) Examples: &#dddd; (decimal) � (hex)

Slide 55 Finding Symbols PowerPoint’s Insert Symbol dialog box is a good tool

Slide 56 Named Entities (Example) The following <br> is rendered as

Slide 57 Whitespace Whitespace refers the spaces, tabs, and carriage returns are all whitespace characters Whitespace is normalized in HTML5 Carriage return characters are rendered as a single space

Slide 58 Whitespace (Example) Whitespace is normalized when an THML document is rendered: The following will be rendered the same: foo foo

Slide 59 Whitespace (Example) The following text This text will appear on one line Will be rendered as (whitespace is normalized): This text will appear on one line