Basic HTML Document Structure. Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create a formal.

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

LIS650lecture 1 XHTML 1.0 strict Thomas Krichel
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
A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
3 November 2008CIS 340 # 1 Topics To define XML as a technology To place XML in the context of system architectures.
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
HTML and XHTML Controlling the Display Of Web Content.
Markup Languages Controlling the Display Of Web Content.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
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.
Creating HTML 5 Documents (The Basics). Slide 2 Goals (XHTML HTML5) XHTML Separate document structure and content from document formatting HTML 5 Create.
Creating a Simple Page: HTML Overview
Headings, Paragraphs, Formatting, Links, Head, CSS, Images
Creating a Basic Web Page
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 (HyperText Markup Language)
.  Entertain  Inform  Educate  Blogs  Sell  Date  Gamble  Religion.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Web page - A Web page is a simple text file that contains a set of HTML tags (code) that describe (to the browser) what should go on a web page. It may.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
HTML. WHAT IS HTML HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
 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,
Bare bones slide show. The format is text files, with.htm or.html extension. Hard returns, tabs, and extra spaces are ignored. DO NOT use spaces in file.
HTML | DOM. Objectives  HTML – Hypertext Markup Language  Sematic markup  Common tags/elements  Document Object Model (DOM)  Work on page | HTML.
CA Professional Web Site Development Class 2: Anatomy of a Web Site and Web Page & Intro to HTML.
HTML: Hyptertext Markup Language Doman’s Sections.
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
XHTML TAGS I Basic Tags. North Lake College 2 by Sean Griffin Sample XHTML Code.
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.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
U NDERSTAND THE W EB AND D IGITAL C OMMUNICATIONS P ATHWAY 4.02 U NDERSTAND HOW W EBPAGES ARE CREATED AND USED.
XML Basics A brief introduction to XML in general 1XML Basics.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
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.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
CIS 228 The Internet Day 2, 9/1/11 Hypertext. The Course Instructor: Bowen Alpern Office hour: GI 137-I, 4-5pm Tu.
PART 1 XML Basics. Slide 2 Why XML Here? You need to understand the basics of XML to do much with Android All of they layout and configuration files are.
XML Notes taken from w3schools. What is XML? XML stands for EXtensible Markup Language. XML was designed to store and transport data. XML was designed.
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
Introduction to HTML Dave Edsall IAGenWeb County Coordinator’s Conference June 30, 2007.
HTML CS 4640 Programming Languages for Web Applications
HTML Basics.
Working with Tables: Module A: Table Basics
Introduction to HTML.
Introduction to XHTML.
WEBSITE DESIGN Chp 1
Basic HTML Document Structure
Introducing HTML & XHTML:
HTML CS 4640 Programming Languages for Web Applications
Presentation transcript:

Basic HTML Document Structure

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 focus on HTML 5

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 HTML and XML Roughly speaking, HTML is a specific XML vocabulary Document Type Definitions (DTDs) are used to create XML vocabularies There are many vocabularies in addition to HTML 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 HTML5 Document DTD The DTD has been reduced down to And does not physically exist

Slide 8 HTML5 Validation Visual Studio.NET automatically validates HTML 5 (and other versions) documents as you edit them Note that most browsers WILL render invalid HTML5 documents I WILL NOT accept them without penalty though

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

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

Slide 11 Document Validation And see the results

Slide 12 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 13 HTML 5 Semantics We have all heard of the semantic Web HTML 5 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 14 Elements (Syntax) Elements have starting tags and ending tags Starting tags appear in <> characters as in Ending tags appears in characters as in So a paragraph becomes: I am a paragraph. When there is no data, a shorthand notation can be used as in (line break)

Slide 15 XHTML Elements and Attributes Elements are roughly categorized into two types Block-level elements define the structure of a page Paragraphs, tables, etc… 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 16 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 17 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 18 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 19 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 20 The Element (1) It’s the document header and contains information about the Web page

Slide 21 The Element (2) Child elements (more detail about these later) - 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 22 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 Include a short title as it is used by search engines

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

Slide 24 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 25 The Purpose of a URL We use Uniform Resource Locators to Send requests to Web servers Send information about the request

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

Slide 27 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 28 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 29 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 30 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 31 Page Layout There are some design rules / suggestions for Web pages Some look like this:

Slide 32 Page Layout It represents the header for the page or article It Use the role attribute to improve accessibility Ski Area List</h1

Slide 33 Page Layout The tag is used to depict a navigation section containing some kind of menu Again, the role attribute depict the section’s purpose Ski Area List

Slide 34 Page Layout The element marks the main content of the document A page can have at most one element It should not contain content repeated across documents (menus, headers, footers, etc.) IE does not support this element It cannot be a descendant of,,, or

Slide 35 Page Layout Use the element to represent a complete or self-contained thought And often appears as a descendant of the element Articles can be nested An has one or more sections element

Slide 36 Page Layout An contains tangential content of an or section A marks a footer for an article, aside, body, details, fieldset, figure, nav, or section.

Slide 37 Generic Containers The tag is a block-level element Use it to mark content without semantic meaning It’s just a placeholder for content

Slide 38 Naming Elements Use the id attribute to uniquely identify an element This of this attribute as a variable name It will become important later when we Work with Cascading Style Sheets (CSS) Work with JavaScript and other programs