2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.

Slides:



Advertisements
Similar presentations
3.02D HTML Overview 3.02 Develop webpages.
Advertisements

Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
Teppo Räisänen LIIKE/OAMK 2010
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.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Computer Science 1611 Internet & Web Creating Webpages Hypertext and the HTML Markup Language.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Marking Up With Html: A Hypertext Markup Language Primer
HTML Introduction HTML
Basic HTML Workshop LIS Web Team Fall What is HTML? Stands for Hyper Text Markup Language Computer language used to create web pages HTML file =
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
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
Basics of HTML.
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.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
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.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
CS 299 – Web Programming and Design Introduction to HTML.
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)
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
CP2022 Multimedia Internet Communication1 HTML and Hypertext The workings of the web Lecture 7.
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.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
XP New Perspectives on The Internet, Sixth Edition— Comprehensive Tutorial 8 1 Creating Effective Web Pages Creating HTML Documents Tutorial 8.
Exploring the Digital Domain HTML Basics. HTML Hypertext Markup Language Standard (ASCII) text with embedded format codes Most HTML tags are paired Tags.
What is Markup and Markup Languages? What is HTML? A Basic HTML Document Basic HTML Tags Tag Attributes and Text Formatting Tags Insert Hyperlinks Add.
1 Creating Web Pages Part 1. 2 OVERVIEW: HTML-What is it? HyperText Markup Language, the authoring language used to create documents on the World Wide.
HTML: Hyptertext Markup Language Doman’s Sections.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
1 Web Application Programming Presented by: Mehwish Shafiq.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
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 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
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.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
Web Design – Week 2 Introduction to website basics Website basics: How the Web Works Client / server architecture Packet switching URL components.
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.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 1 Using HTML to Create Web Pages.
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
3.00cs HTML Overview 3.00cs Develop webpages.
Chapter 1: Introduction to XHTML (part 1)
Introduction to XHTML.
WEBSITE DESIGN Chp 1
Computers and Scientific Thinking David Reed, Creighton University
1 Introduction to XHTML.
Introduction to HTML- Basics
Introduction to HTML.
4.02A HTML Overview 4.02 Develop web pages using various layouts and technologies. (Note to instructor: HTML tags are in red only to differentiate from.
Presentation transcript:

2.1 XHTML

Motto High thoughts must have high language. –Aristophanes

Why XHTML or HTML Web page editors (Dreamweaver, FrontPage, etc.) allow user to create pages without having to knowing HTML So why to learn it? 1.They don't always produce the layout we want 2.The HTML produced is messy & complicated 3.We can't create dynamic web pages without knowing the page elements

XHTML Extensible HyperText Markup Language –language that defines web page elements Based on HTML –HyperText Markup Language –becoming legacy technology Is a specific XML –obeys XML rules –subset of HTML elements XHTML 1.0 –defines only a document’s content and structure to appear in a valid XHTML document, –formatting specified with Cascading Style Sheets

Elements An element is delimited by a start tag and an end tag –A start tag consists of the element name in angle brackets –e.g., –An end tag consists of / and the element name in angle brackets –e.g., Some elements can be nested within other elements Start and end tags of a leaf element (does not contain other elements) can be combined into a single tag –it starts with < and tag name –it ends with space and /> e.g.,

Element Attributes Some start tags can have attributes –they provide additional information about an element –an attribute has a name and a value separated by an equals sign = –value is enclosed in double-quotes "…" –e.g., CNN

Hierarchy Tags must not overlap –a child element’s end tag must come before the parent element's end tag –e.g., hi there –this is illegal in XHTML –but it's legal in HTML

Text Some elements contain text enclosed in between their start and end tags E.g., a paragraph element contains text to be rendered – USA Today –whitespace is interpreted as a single space spaces tabs end of lines The element leaves whitespace intact

Comments –begin with <!–- –end with --> –e.g. Browsers ignore all text inside a comment Web page editors don't produce comments You must –document your pages using comments!

Processing Instructions Similar syntax as a leaf element –enclosed in –can contain attributes –e.g., Are not rendered Tell the browser how process document

Top Level of a Document Every XHTML document starts with the "processing instruction": – followed by specification of the XHTML grammar: – then comes the root element : –has an attribute: which version of XHTMT is meant » –all elements are nested in and tags –contains and elements

Main Elements element –contains –generally is not rendered element –names a web page –appears in the title bar of the browser's window –identifies the page in the list of Favorites or Bookmarks –Good style: Make the title expressive, but terse! –contains elements to be rendered –contents of the page other elements and text

Example Welcome Welcome to ICS 415!

Good Style XHTML is a data description language The same rules of good style apply as in a programming language Treat a document as a program –Document it –Indent according to the nesting depth –Be consistent in formatting

Acceptable Indenting Welcome Welcome to ICS 415! Hope you'll enjoy it! Acceptable only at top level and only because –top level structure is always the same –we may want to keep lines from running off to the right

Good Style: No Caps Don't use uppercase letters in tags –It violates XHTML syntax –Violates the principle of emphasis should correspond to importance –Caps emphasize disproportionally Tags are important But text is important, too –Reader's eyes are distracted by having to keep switching from upper to lower case

Validity Syntactically correct XHTML documents are guaranteed to render properly Some browsers will render incorrect documents, too –but they may not display them properly Validation tools ensure syntactic correctness –e.g., validator.w3.org Make sure your documents are valid

Headings Heading elements – through –for titles and subtitles – is rendered in the largest font –Successive heading elements are rendered in a progressively smaller and smaller font The font sizes vary significantly between browsers Use cascading style sheets to assure same size –see next lecture

Headings: Example Headings Level 1 Heading Level 2 heading Level 3 heading Level 4 heading Level 5 heading Level 6 heading

Links Hyperlinks reference other resources –web pages, files, addresses –browsers typically underline hyperlinks and color them blue (anchor) element defines a link – href attribute specifies the resource's URL

URL Uniform Resource Locator –path to a resource –either absolute starts with protocol –e.g., or ftp://, or file://, or … –or relative no protocol /./ means one level up

Links: Example Favorites My Favorites Google Yahoo! CNN

Images element src attribute: image’s URL alt attribute: contains text displayed if the browser can't render the image –a must for accessibility width and height attributes –size of the image in pixels –always use them so that browser can layout page right away –make sure that it's the actual size resize the picture itself if necessary, browser will distort it –unless you want to expand a line to create a strip An image can be embedded in an anchor element –that creates a link so that the user can click on the image

Images: Example Keiki Keiki