HTML Overview. With an emphasis on XHTML

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

Module 2 (III): XHTML

Introduction to HTML5

introduction to XHTML

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

Web Publishing Basics I

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

Create a cool image gallery using CSS visibility and positioning property

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

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

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

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

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

Micronet International College

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

Lab 4 CSS CISC1600, Spring 2012

CIS 228 (Fall 2011) Exam 1, 9/27/11

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

How the Internet Works

Implementing a chat button on TECHNICAL PAPER

INTRODUCTION TO WEB USING HTML What is HTML?

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

XHTML & CSS CASCADING STYLE SHEETS

Chapter 10: Understanding the Standards

UR what? ! URI: Uniform Resource Identifier. " Uniquely identifies a data entity " Obeys a specific syntax " schemename:specificstuff

HTML HTML. Chris Seddon CRS Enterprises Ltd 1

CMPT 165 Unit 2 Markup Part 2

Management Information Systems

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

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

Part 1: HTML Language HyperText Make-up Language

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

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

Modify cmp.htm, contactme.htm and create scheduleme.htm

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

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

11. HTML5 and Future Web Application

CSC 121 Computers and Scientific Thinking

A designers guide to creating & editing templates in EzPz

Vebra Search Integration Guide

Dreamweaver: Portfolio Site

CMT111-01/M1: HTML & Dreamweaver. Creating an HTML Document

The Structural Layer (Hypertext Markup Language) Webpage Design

From administrivia to what really matters

CSC Web Programming. Introduction to HTML

MP3 (W7,8,&9): HTML Validation (Debugging) Instruction

HTML: The Basics & Block Elements

Design Project. i385f Special Topics in Information Architecture Instructor: Don Turnbull. Elias Tzoc

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

Announcements. Paper due this Wednesday

Semantic Web Lecture Part 1. Prof. Do van Thanh

IT350 Web & Internet Programming. Fall 2012

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

CS134 Web Site Design & Development. Quiz1

HyperText Markup Language (HTML)

Web Design and Development ACS Chapter 3. Document Setup

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

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

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

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

Inline Elements Karl Kasischke WCC INP 150 Winter

HTML Overview formerly a Quick Review

A Brief Introduction to HTML

ANSWER KEY Exam I (Yellow Version) CIS 228: The Internet Prof. St. John Lehman College City University of New York 26 February 2009

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

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Digital Asset Management 2. Introduction to Digital Media Format

Duke Library Website Preliminary Accessibility Assessment

GIMP WEB 2.0 MENUS. Before we begin this tutorial let s visually compare a standard navigation bar and a web 2.0 navigation bar.

Certified HTML5 Developer VS-1029

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

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

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

Programmazione Web a.a. 2017/2018 HTML5

Hyper Text Markup Language

A Balanced Introduction to Computer Science, 3/E

Fundamentals: Client/Server

Hyper Text Markup Language

COMPSCI 111 / 111G An introduction to practical computing

Contents. Topics. 01. WWW 02. WWW Documents 03. Web Service 04. Web Technologies. Management of Technology. C01-1. Documents

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

(from Chapter 5 & 25.6 of the text)

TEST NAME: MMWD 4.01 TEST ID: GRADE:09 - Ninth Grade Twelfth Grade SUBJECT:Computer and Information Sciences TEST CATEGORY: My Classroom

bur,:{ f 2

Why HTML5? Why not XHTML2? Learning from history how to drive the future of the Web

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

Anatomy of an HTML document

Basic Web Pages with XHTML (and a bit of CSS) CSE 190 M (Web Programming), Spring 2008 University of Washington Reading: Chapter 1, sections

HTML and CSS Lecture 15 COMPSCI111/111G SS 2018

Markup Language. Made up of elements Elements create a document tree

Overview. Part I: Portraying the Internet as a collection of online information systems HTML/XHTML & CSS

CMT111-01/-M1: HTML & Dreamweaver. Creating an HTML Document (Continued)

HTML & XHTML Tag Quick Reference

Chapter 4 - Introduction to XHTML: Part 1

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

CSCU9B2: Web Tech Lecture 1

CS144 Notes: Web Standards

Introduction to Web Technologies

Introduction to Web Development

Web Design and Application Development

Transcription:

HTML Overview With an emphasis on XHTML

What is HTML? Stands for HyperText Markup Language A client-side technology (i.e. runs on a user s computer) HTML has a specific set of tags that allow: the structure of a document to be described e.g., <h1> - large heading element Content to be added to a page e.g. <img> - image element links to other documents on web defined e.g, <a> - hypertext anchor element (i.e. link) A small group of browser supported tags that are interpreted upon page loading (small implies < 100) Inherently stupid (i.e. is unable to make decisions, use logic, etc) Loose and easy with rules of formatting (browser will make logical assumptions)

HTML: Example <html> <head> <title> My Page </title> </head> <body> <h1> My Page </h1> <p> This is great </p> </body> </html> Uses Tags: html head title body h1 p

Tags and Elements The core building block of HTML is the tag, which marks each element in a document. HTML tags are used to mark up a page. Tags start and end with angle brackets (e.g., <h1>) Need a start and and an end tag to mark up a region. End tags have an additional /. <h1> My Page </h1> The two tags define named elements. Above is an <h1> element. <head> element gives information about page. <body> element contains content of page.

Two-Sided Tags Tags can be two-sided or one-sided. A two-sided tag is a tag that contains some document content. General syntax for a two-sided tag: <element>content</element> The information or text between the element tags is interpreted/parsed and displayed by the browser Examples: <h1> <h6>, <a>, <b>, <u> etc.

One-Sided Tags A one-sided tag contains no document text content Are sometimes called empty elements. General syntax for a one-sided tag: <element /> The /> will be explained later in the lecture One-sided tags tend to be for page formatting or for non-text page content Examples: <br/>, <hr/>, <img/>

Elements and Attributes Elements can also have attributes, giving additional information. <body bgcolor= blue >..</body> <table width= 610 >..</table> <a href= http://opentech2.durhamcollege.ca >link</a> URL - Uniform resource locator Last example defines anchor with hyperlink to another page.

Adding Multimedia Images and other multimedia elements easily added to the page, e.g., <img src= mypic.jpg alt= me /> <img src= images/logo.gif alt= Company Logo /> <img src= http://www.myserver.ca/mycar.jpg alt= My Car /> The included image is indicated using a URL. The first two examples are relative URLs The third is an absolute URL Strictly you must use an alt attribute giving a text description of the file, for folks who cannot access the image. More recent versions of HTML use the <object> tag to incorporate any media object, rather than the <img> tag.

HTML Special Character Entities HTML comments <!-- everything inside these tags is ignored by the browser --> Special Characters Certain characters are special to the browser or are not part of a standard keyboard setup, HTML therefore has special character codes is is & is the & < is < is > is > is For a more complete listing, check out: http://www.w3schools.com/html/html_entities.asp

HTML Page Structure You can t use any tags anywhere on the page! The rules for which structures are allowed are well defined (as for programming languages). References are available These state which elements are allowed within which other elements. They may distinguish block level and inline elements - block level ones apply to long sections.

HTML/Web Resources There is not an HTML textbook for this course There are several online resources on the web (too many to count) Instructor s preference http://www.w3schools.com/ Feel free to try to find your own

What is XML? The extensible Markup Language Looks like HTML (in the fact that there are tags) Designed to be structured Strict rules about how data can be formatted These rules apply to how the tags can be written and are supported (tighter rules) The rules are laid out in a XML standards Document Type Definition (DTD)

Document Type Definition Defines the rules for a specific document type Including: Acceptable tag names Tag structure (what tags can exist in other tags) Acceptable attributes for tags (including data type for the attributes)

What is XHTML then? XHTML is a family of current and future document types and modules that reproduce, subset, and extend HTML 4.0 HTML family document types are XML based, and ultimately are designed to work in conjunction with XMLbased user agents. Looks exactly like HTML (because it is) The X deals instead with formalizing the way in which HTML is implemented (to deal with future support of tags within browsers)

Why XHTML? Alternate ways of accessing the Internet are constantly being introduced. The XHTML family is designed with general user agent interoperability in mind. Ultimately, it will be possible to develop XHTMLconforming content that is usable by any XHTMLconforming user agent. WHAT DOES THAT MEAN? Motivation: intended to alleviate browser issues of the late 1990 s and enhance portability in the future Plus, it is worth marks on assignments in this course

HTML vs. XHTML <ul> <li>html allows <b><i>improper nesting</b></i></li>. <li>html allows start tags, without end tags, like the <br> tag.<!-- NOTE missing closing li --> <li>html allows <span color=#9900cc>attribute values</span> without quotes</li> <LI>HTML is case-insensitive</li> </ul> <ul> <li>xhtml requires <b><i>proper nesting</i></b>.</li> <li>xhtml requires empty tags to be identified with a trailing slash, as in <br/>.</li> <li>xhtml requires <span color="#9900cc">quoted attribute values</span>.</li> <li>xhtml is case-sensitive (lower case is the XHTML standard)</li> </ul>

XHTML Validation There are tools that allow you to validate or check your HTML page. For them to work you must make it clear which version of XHTML you are writing! You can do that by adding the document type declaration to top of your page. E.g. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">

Character encodings You will also need to state what character encoding and language you are using For the language you can add the following at the top of the document (below the DOCTYPE declaration) as an attribute for the <html> tag: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> For the character set in the <head> of the document you should add: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> N.B. (UTF-8 is a common character set for web implementations)

Minimum XHTML Valid Template Therefore, for this course you will be require to have these following lines at the top of all of your pages <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>a title Specific to the Page</title> </head> <body> <!-- this is where the main page content will show up --> <! please note the tabbing, ignored by the browser but appreciated by your instructor --> </body> </html> The closing </body> and </html> at the bottom make the rest of the file XHTML compliant

XHTML Validation The World Wide Web Consortium (W3C) offers an online tool that will validate HTML to see if it complies to XHTML rules URL http://validator.w3.org/ Transitional is a little looser than Strict Note: we will be using transitional for the first few assignments, but will be going strict later in this course.