Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Similar documents
introduction to XHTML

HTML: Parsing Library

HTML: Parsing Library

Wireframe :: tistory wireframe tistory.

WML2.0 TUTORIAL. The XHTML Basic defined by the W3C is a proper subset of XHTML, which is a reformulation of HTML in XML.

XHTML & CSS CASCADING STYLE SHEETS

Internet publishing HTML (XHTML) language. Petr Zámostný room: A-72a phone.:

Announcements. Paper due this Wednesday

XHTML. XHTML stands for EXtensible HyperText Markup Language. XHTML is the next generation of HTML. XHTML is almost identical to HTML 4.

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Module 2 (III): XHTML

HTML. HTML Evolution

The [HTML] Element p. 61 The [HEAD] Element p. 62 The [TITLE] Element p. 63 The [BODY] Element p. 66 HTML Elements p. 66 Core Attributes p.

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Index. CSS directive, # (octothorpe), intrapage links, 26

CPET 499/ITC 250 Web Systems. Topics

Introduction to HTML5

Advanced HTML Scripting WebGUI Users Conference

Oliver Pott HTML XML. new reference. Markt+Technik Verlag

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.

Inline Elements Karl Kasischke WCC INP 150 Winter

COSC 2206 Internet Tools. Brief Survey of HTML and XHTML Document Structure Formatting

Evaluation of alignment methods for HTML parallel text 1

Certified HTML Designer VS-1027

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Certified HTML5 Developer VS-1029

What is XHTML? XHTML is the language used to create and organize a web page:

ROLE OF WEB BROWSING LAYOUT ENGINE EVALUATION IN DEVELOPMENT

Fall Semester 2016 (2016-1)

Tutorial 1 Getting Started with HTML5. HTML, CSS, and Dynamic HTML 5 TH EDITION

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

SilkTest 2009 R2. Rules for Object Recognition

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Document Object Model. Overview

HTML+ CSS PRINCIPLES. Getting started with web design the right way

Silk Test Object Recognition with the Classic Agent

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

HTML & XHTML Tag Quick Reference

Review of HTML. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

COPYRIGHTED MATERIAL. Contents. Introduction. Chapter 1: Structuring Documents for the Web 1

1/6/ :28 AM Approved New Course (First Version) CS 50A Course Outline as of Fall 2014

(X)HTML. Internet Engineering. Spring Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

Continues the Technical Activities Originated in the WAP Forum

UNIT II Dynamic HTML and web designing

HTML. HTML is now very well standardized, but sites are still not getting it right. HTML tags adaptation

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

Scripting for Multimedia LECTURE 1: INTRODUCING HTML5

White Paper. elcome to Nokia s WAP 2.0 XHTML browser for small devices. Advantages of XHTML for Wireless Data

Creating A Web Page. Computer Concepts I and II. Sue Norris

Fundamentals: Client/Server

HTML Markup for Accessibility You Never Knew About

INTRODUCTION TO HTML5! HTML5 Page Structure!

Motivation (WWW) Markup Languages (defined). 7/15/2012. CISC1600-SummerII2012-Raphael-lec2 1. Agenda

Cascading Style Sheet

Web development using PHP & MySQL with HTML5, CSS, JavaScript

HTML: The Basics & Block Elements

HTML Overview. With an emphasis on XHTML

Web Development and HTML. Shan-Hung Wu CS, NTHU

Programmazione Web a.a. 2017/2018 HTML5

What is a web site? Web editors Introduction to HTML (Hyper Text Markup Language)

Beginning Web Programming with HTML, XHTML, and CSS. Second Edition. Jon Duckett

5-Sep-16 Copyright 2016 by GemTalk Systems LLC 1

HTML CS 4640 Programming Languages for Web Applications

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

HTML TUTORIAL ONE. Understanding What XHTML is Not

QUICK REFERENCE GUIDE

Title: Sep 12 10:58 AM (1 of 38)

Canvas & Brush Reference. Source: stock.xchng, Maarten Uilenbroek

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

HTML Overview formerly a Quick Review

Intro to html. --- define every element, attribute, and entity along with the rules for their use

HTML is a mark-up language, in that it specifies the roles the different parts of the document are to play.

"utf-8";

Programming of web-based systems Introduction to HTML5

HyperText Markup Language (HTML)

Duke Library Website Preliminary Accessibility Assessment

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Chapter 10: Understanding the Standards

Designing UI. Mine mine-cetinkaya-rundel

c122jan2714.notebook January 27, 2014

Hyper Text Markup Language HTML: A Tutorial

Web Design and Development ACS Chapter 3. Document Setup

Structured documents

A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

CS144 Notes: Web Standards

Web Publishing Basics I

Tutorial 2 - HTML basics

2.1 Origins and Evolution of HTML

Static Webpage Development

Advanced Web Programming C2. Basic Web Technologies

Understanding the Web Design Environment. Principles of Web Design, Third Edition

Create web pages in HTML with a text editor, following the rules of XHTML syntax and using appropriate HTML tags Create a web page that includes

INTRODUCTION TO WEB USING HTML What is HTML?

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

HTML Hyperlinks (Links)

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

Transcription:

Chapter 2:- Introduction to XHTML Compiled By:- Assistant Professor, SVBIT.

Outline Introduction to XHTML Move to XHTML Meta tags Character entities Frames and frame sets Inside Browser

What is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML 4.01 XHTML is a stricter and cleaner version of HTML 4.01 XHTML is HTML defined as an XML application XHTML is supported by all major browsers.

XHTML Structure Document Structure XHTML Elements XHTML Attributes

<!DOCTYPE> declaration The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag. The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in. In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly. HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

Document Structure XHTML DOCTYPE is mandatory. The doctype should be the very first line of your document and should be the only thing on that line. You don't need to worry about this confusing older browsers because the Doctype is actually a comment tag. It is used to find out the code which the page is written in, but only by browsers/validators which support it, so this will cause no problems. After the Doctype line, the actual XHTML content can be placed. As with HTML, XHTML has <html> <head> <title> and <body> tags but, unlike with HTML, they must all be included in a valid XHTML document

XHTML document Structure Strict Transitional Frameset

Example <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/d TD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w 3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> <!DOCTYPE html PUBLIC "- //W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/tr/xhtml1/dt D/xhtml1-frameset.dtd"> Strict - This is used mainly when the markup is very clean and there is no 'extra' markup to aid the presentation of the document. This is best used if you are using Cascading Style Sheets for presentation. Transitional - This should be used if you want to use presentational features of HTML in your page. Frameset - This should be used if you want to have frames on your page.

XHTML Elements XHTML elements must be properly nested. XHTML elements must always be closed. XHTML elements must be in lowercase.

XHTML Attributes Attribute names must be in lower case Attribute values must be quoted Attribute minimization is forbidden

Difference between HTML and XHTML HTML The HTML tags are case insensitive. Hence <body> or <BODY> or <Body> are treated as one and the same We can omit the closing tags sometimes in HTML document. Can have empty/open tags e.g. <br>, <p> In HTML even if we do not follow the nesting rules strictly it does not cause much difference. An application of SGML(Standard Generalized Markup Language) XHTML The XHTML is case sensitive and all the tags in XHTML document must be written in lower case. For every tag there must be closing tag. All the unclosed tags must be closed e.g. <br/>, <p></p> In XHTML documents is nesting An application of xml

Why XHTML? Many pages on the internet contain "bad" HTML. The following HTML code will work fine if you view it in a browser (even if it does NOT follow the HTML rules): <html> <head> <title>this is bad HTML</title> <body> <h1>bad HTML <p>this is a paragraph </body>

Why XHTML? Today's market consists of different browser technologies. Some browsers run on computers, and some browsers run on mobile phones or other small devices. Smaller devices often lack the resources or power to interpret a "bad" markup language. Therefore - by combining the strengths of HTML and XML, XHTML was developed. XHTML is HTML redesigned as XML.

Quick list of syntax rules Attribute names must be in lower-case Attribute values must be quoted Attributes cannot be minimized The name attribute is replaced by the id attribute Some elements are mandatory

Attribute names must be in lower-case Not just attributes, but tags as well must all be in lowercase in XHTML. Example with uppercase tags and attributes: The above example fixed to conform to XHTML standards: <html> <head> <TITLE>Tags properly closed</title> </head> <body> <TABLE> <TR> <TD ALIGN="CENTER">Cell 1</TD> <TD ALIGN="CENTER">Cell 2</TD> </TR> </body> </html> <html> <head> <title>tags properly closed</title> </head> <body> <table> <tr> <td align="center">cell 1</td> <td align="center">cell 2</td> </tr> </body> </html>

Attribute values must be quoted Attributes should always be quoted. Even though a page may appear as you intend it to even if you don't quote attributes, the page will not validate with an XHTML validator. Also, if the value given to the attribute that is not quoted has at least one space, the page may actually not appear as you intend it to. Attributes not quoted: <html> <head> <title>quoting attributes</title> </head> <body> <input type="button" value=i am a button /> <br /><br /> <a href=http://www.yahoo.com target="_blank"> Yahoo search engine </a> </body> </html>

<html> <head> <title>quoting attributes</title> </head> <body> Example HTML <input type="button" value=i am a button /> <br /><br /> <a href=http://www.yahoo.com target="_blank"> Yahoo search engine </a> </body> </html>

<html> <head> <title>quoting attributes</title> </head> <body> XHTML <input type="button" value="i am a button" /> <br /><br /> <a href="http://www.yahoo.com" target="_blank"> Yahoo search engine </a> </body> </html>

Basic Doc Type Structure Module Presentation module Text Module Hypertext Module List Module Forms Module Basic Tables Module Image Module Metainformation Module Link Module Stylesheet module body, head, html, title b, big, hr, i, small, sub, sup, tt abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var a dl, dt, dd, ol, ul, li button, fieldset, form, input, label, legend, select, optgroup, option, textarea caption, table, td, th, tr img meta link style element

Metatags Metadata is information about data. The <meta> tag provide the metadata about the HTML document. Meta elements are typically used to specify page description, key words, author of the document and so on. The <meta> tag is always written within <head> section.

Metatags Specify information about a document Attribute name Identifies the type of meta element keywords ( name = keywords ) Provides search engines with a list of words that describe a page description ( name = description ) Provides a description of a site Attribute content Provides the information search engine use to catalog pages

Meta (keyword) HTML <meta name="keywords" content="html, css, JavaScript"> XHTML <meta name="keywords" content="html, css, JavaScript" /> The above is an example of using the <meta> tag to provide keyword information that can be used by search engines.

Meta (Description) HTML <meta name="description" content="web Page Design"> XHTML <meta name="description" content="web Page Design" /> The above is an example of using the <meta> tag to provide a description of the web page. This information may be used by search engines.

Meta (http-equiv) HTML <meta http-equiv="refresh" content="300"> XHTML <meta http-equiv="refresh" content="300" /> The above is an example of using the <meta> tag to re-load a web page after a specified number of seconds. In this example is it 300 seconds. This technique can be used to automatically refresh a web page that has frequently changing content like would be the case for a website that displays the current temperature