introduction to XHTML

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

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

How the Internet Works

Announcements. Paper due this Wednesday

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

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

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

HTML. Hypertext Markup Language. Code used to create web pages

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

Programmazione Web a.a. 2017/2018 HTML5

11. HTML5 and Future Web Application

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

INTRODUCTION TO WEB USING HTML What is HTML?

c122jan2714.notebook January 27, 2014

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

CS134 Web Site Design & Development. Quiz1

HTML TUTORIAL ONE. Understanding What XHTML is Not

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

XHTML & CSS CASCADING STYLE SHEETS

HTML Overview. With an emphasis on XHTML

Chapter 2 Creating and Editing a Web Page

HyperText Markup Language (HTML)

Chapter 4. Introduction to XHTML: Part 1

Web Publishing Basics I

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

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

CSC 121 Computers and Scientific Thinking

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

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

INTRODUCTION TO HTML5! HTML5 Page Structure!

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

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

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

It is possible to create webpages without knowing anything about the HTML source behind the page.

HTML & XHTML Tag Quick Reference

Web Design and Development ACS Chapter 3. Document Setup

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

Html basics Course Outline

Introduction to HTML. SSE 3200 Web-based Services. Michigan Technological University Nilufer Onder

Duke Library Website Preliminary Accessibility Assessment

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

Fundamentals: Client/Server

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

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2017)

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

HTML Overview formerly a Quick Review

HTML. HTML Evolution

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

CSC Web Programming. Introduction to HTML

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

Advanced Web Programming C2. Basic Web Technologies

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

COMS W3101: SCRIPTING LANGUAGES: JAVASCRIPT (FALL 2018)

Wireframe :: tistory wireframe tistory.

UNIT 2. Creating Web Pages with Links, Images, and Formatted Text

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

Web Programming and Design. MPT Senior Cycle Tutor: Tamara Week 1

A Balanced Introduction to Computer Science, 3/E

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

HTML Images - The <img> Tag and the Src Attribute

Introduction to HTML

CSCE 101. Creating Web Pages with HTML5 Applying style with CSS

Basic HTML Lecture 14

COMP519 Web Programming Lecture 3: HTML (HTLM5 Elements: Part 1) Handouts

What You Will Learn Today

FOR EVALUATION USE ONLY

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

Advanced HTML Scripting WebGUI Users Conference

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

Web Programming Week 2 Semester Byron Fisher 2018

Week 1 - Overview of HTML and Introduction to JavaScript

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

Chapter 10: Understanding the Standards

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

HTML. Mendel Rosenblum. CS142 Lecture Notes - HTML

Introduction to HTML5

A Brief Introduction to HTML

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Creating Web Pages Using HTML

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

Web Development and Design Foundations with HTML5 8th Edition

Full file at New Perspectives on HTML and CSS 6 th Edition Instructor s Manual 1 of 13. HTML and CSS

Create a cool image gallery using CSS visibility and positioning property

Creating and Editing a Web Page Using Inline Styles

(from Chapter 5 & 25.6 of the text)

CHAPTER 1: GETTING STARTED WITH HTML CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

Desire2Learn: HTML Basics

Management Information Systems

Introduction to WEB PROGRAMMING

(1) I (2) S (3) P allow subscribers to connect to the (4) often provide basic services such as (5) (6)

HTML: The Basics & Block Elements

Hyper Text Markup Language HTML: A Tutorial

The Structural Layer (Hypertext Markup Language) Webpage Design

CISC 1400 Discrete Structures

Part 1: HTML Language HyperText Make-up Language

Transcription:

introduction to XHTML XHTML stands for Extensible HyperText Markup Language and is based on HTML 4.0, incorporating XML. Due to this fusion the mark up language will remain compatible with existing browsers and remain so in future versions and updates. An XHTML document consists of 3 main parts: DOCTYPE document type definition [DTD] first element on page validates page activates standard compliant mode in InternetExplorer and Mozilla browsers head <head> element contains metadata for page not displayed by browser links to external script files, such as css, javascript, etc... <> element contains page content displays page elements required valid use / structure of tags 01 DOCTYPE - content DOCTYPE XHTML 1.0* specifies three XML document types that correspond to the three HTML 4.0 DTDs: Strict, Transitional, and Frameset. Strict: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www. w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd > Transitional: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd > >> see sample on following page>> Frameset: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Frameset//EN http://www. w3.org/tr/xhtml1/dtd/xhtml1-frameset.dtd > * Although proper XML structure requires placing the DOCTYPE after the XML prolog, IE6 has a bug that causes the browser render in quirks mode if there is anything before the DOCTYPE definition

head element - content head 02 <head> </head> The head element contains several different types of data, such as its title, keywords that may be useful to search engines, and other data that is not considered document content. Browsers do not generally render and display elements within the <head> as content. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd > <html> <head> <meta http-equiv= Content-Type content= text/html; charset=iso-8859-1 /> <meta name= description content= online resources for my students /> <meta name= keywords content= css, tutorials, links, web design, compatibility, web standards /> <meta name= author content= graphiceyedea, www.graphiceyedea.co.uk. /> <link rel= stylesheet href= css/full.css type= text/ css media= screen, projection /> <title>webeyedea.info - welcome</title> </head> <meta........ /> <meta /> The meta element is used to embed document meta-information not defined by other HTML elements - to identify properties of a document (e.g. author, expiration date, a list of key words, etc.) and assign values to those properties. name This attribute identifies a property name. content This attribute specifies a property s value. http-equiv This attribute may be used in place of the name attribute. HTTP servers use this attribute to gather information for HTTP response message headers. syntax single tag ending in space +forward slash < /> >> see sample above >> <link........ /> <link /> The link element provides a media independent method for defining relationships with other documents and resources. rel This attribute identifies the relationship of linked element href This attribute names the object using URI notation type This attribute specifies the content type of linked element and specifies the URL to the linked element syntax single tag ending in space +forward slash < /> >> see sample above >>

head element - content head <title>...</title> <title> 03 </title> The title element gives the page a name - title - label - which appears on top of the browser window. The text given within the title tag is used for the History within the browser as well as the Bookmarks. The title elements is often neglected and therefore confuses the site s visitors. It is essential to give each page within a site a meaningful and original name to aid ease of use. >> see sample on previous page and below >> element - content <>...</> <> </> The element contains all displayable content of the page - including text, images, animations, sound and other media types. It is important to enclose all content within the tag, ie it opens right after the head tag - followed by all page content - and closes at the bottom of the page - followed by the closing html tag. If this is not set up correctly the page might still display but show glitches and misalignments. For correct interpretation of the code - always make sure to follow the rules ;) 1 2 <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd > 3 4... 15 16 17 18 19 20 21 22 23 24 <head> <meta />... <link /> <title>webeyedea.info - welcome</title> </head> <> <h1>firstheading</h1> <p> content text with some links <a href= http://www.alistapart.com target= _blank > alistapart.com</a> </p> </> </html>

element - content <h1>... </h1> <h1> >> sizes recognised by as defaults by most browsers - from h1 to h6 04 </h1> The h tag is used to define headings within the text and give these certain properties such as size, position, font styling and more. If no properties have been defined - the browser will interpret these rules as set by the user, or its default settings - setting sizes in hierarchie of numbers (h1 largest, h6 smallest). <p>... </p> <p> </p> The p tag is used to define paragraphs within the text - again default or custom settings will be applied if no other properties have been set. <br /> <br /> The br tag is used as the application of a soft return, ie it breaks the flow of the text onto a new line. This is a single tag which is inserted into the text as appropriate (without end tag). syntax single tag ending in space +forward slash < /> <a>... </a> >> can be linked to link or anchor The a tag is used to link to either and anchor specified within the current page - or link to another page within the same site or anywhere else on the net. It contains a minimum of 2 attributes: <a> </a> href= target= location of specified link window targeted _self opens in current window _blank opens in new window <h2>welcome to webeyedea.info </h2> <p> introductory text - welcoming visitor and introducing purpose of the site <br /> more text with news and updates or other comments content text with some links to inspirational and resource sites such as <a href= http://www.alistapart.com target= _blank > alistapart.com</a> </p>

element - content <img... /> 05 <img /> The img tag is used to insert an image or a graphic into the page. It can contain several attriutes and properties. There are 2 required attributes which will bring in the image and give alternative text should the image not display (due to error or disabled graphics within browser) src= image source - image in suitable format (jpg, gif) *required by standards for XHTML alt= alternative text *required by standards for XHTML note: the alt text is intended to display only when the image doesn t load - correctly implemented by Firefox, Safari, Opera and mozilla driven browsers Certain browsers however display these as comments on mouse over, such as Internet Explorer. 2 more attributes ensure efficient rendering by the browser. By adding the specific size of the image - the browser is told which size of graphic will be displayed, allowing simultaneous loading of text and image content speeding up loading time and ensuring the correct size of image (as edited to suit in graphics program!!!). width= width of image display units: pixels px, percent % *improves browser rendering height= height of image display units: pixels px, percent % *improves browser rendering syntax single tag ending in space +forward slash < /> <h2>welcome to webeyedea.info </h2> <p> some relevant text <br /> <a href= http://www.alistapart.com target= _blank > <img src=....jpg alt= alt. text width= 50px height= 50px /> alistapart.com</a> </p>

element - content 06 <ul> <li>... </li> </ul> <ul> <li> </ul> </li> The ul tag is used in combination with the li tag to format an unordered list, ie a list with bullets. Note that the tags are embedded into each other - and not overlapping. Again default or custom settings will be applied in the broswer display if no other properties have been set. syntax open and close tag < > < > </ ></ > <ol> <li>... </li> </ol> <ol> <li> </ol> </li> The ol tag is used in combination with the li tag to format an ordered list, ie a list with numbered items. Note that the tags are embedded into each other - and not overlapping. Again default or custom settings will be applied in the broswer display if no other properties have been set. syntax open and close tag < > < > </ ></ > XHTML code in browser <ul> </ul> <ol> </ol>

element - content 07 <dl> <dt>... </dt> <dd>... </dd> </dl> <dl> <dt> <dd> </dl> </dt> </dd> The dl tag is used in combination with the dt and dd tag to format adefinition list, ie a list which is similar in layout to text in a dictionary. Note that the tags are embedded into each other - and not overlapping. Again, default or custom settings will be applied in the broswer display if no other properties have been set. syntax open and close tag < > < > </ ></ > XHTML code in browser <dl> <dt>term</dt> <dd>definition text to go here with a paragraph of text explaining the requested phrase</dd> <dt>term</dt> <dd>definition text to go here with a paragraph of text explaining the requested phrase</dd> <dt>term</dt> <dd>definition text to go here with a paragraph of text explaining the requested phrase</dd> </dl>

writing XHTML rules 08 for each document - all main 3 elements to be defined - cannot be omitted DOCTYPE head all tags and attributes to be written in lowercase <BODY BGCOLOR= #ff6600 > < bgcolor= #f60 > all attribute values to be quoted < margin=0> < margin= 0 > all non-empty tag (tags which were previously permitted to be open) to be closed paragraph text paragraph<p> <p>paragraph text paragraph</p> all empty tag (tags which were previously in the format of eg <br>) to be terminated paragraph text paragraph<br> paragraph text paragraph<br /> all elements must be nested - no overlaps permitted <ul><li>text</ul></li> <ul><li>text</li></ul>