HTML & XHTML Tag Quick Reference

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

Html basics Course Outline

CSC Web Programming. Introduction to HTML

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

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

Advanced HTML Scripting WebGUI Users Conference

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

c122jan2714.notebook January 27, 2014

Tables *Note: Nothing in Volcano!*

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

Chapter 4. Introduction to XHTML: Part 1

introduction to XHTML

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

IMY 110 Theme 7 HTML Tables

Announcements. Paper due this Wednesday

SECTION C GRADE 12 EXAMINATION GUIDELINES

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

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

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

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

INFS 2150 / 7150 Intro to Web Development / HTML Programming

Chapter 4 Notes. Creating Tables in a Website

Certified HTML5 Developer VS-1029

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

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

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

CSC 121 Computers and Scientific Thinking

CSC Web Technologies, Spring HTML Review

Web Design and Application Development

CS 350 COMPUTER/HUMAN INTERACTION. Lecture 6

Basic HTML Lecture 14

HTML Tags <A></A> <A HREF=" CNN </A> HREF

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

Chapter 4 Creating Tables in a Web Site Using an External Style Sheet

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

Web Programming Week 2 Semester Byron Fisher 2018

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

HTML + CSS. ScottyLabs WDW. Overview HTML Tags CSS Properties Resources

How the Internet Works

CMPT 165 Unit 2 Markup Part 2

Desire2Learn: HTML Basics

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

Creating Web Pages Using HTML

HYPERTEXT MARKUP LANGUAGE ( HTML )

A Balanced Introduction to Computer Science, 3/E

Advanced Web Programming C2. Basic Web Technologies

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

XHTML & CSS CASCADING STYLE SHEETS

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

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

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

Bridges To Computing

HTML Hints & Tips. HTML is short for HyperText Markup Language.

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

11. HTML5 and Future Web Application

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

Lecture 08. Tables in HTML. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

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

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

Creating Tables in a Web Site Using an External Style Sheet

Page Layout Using Tables

Web Design and Development ACS Chapter 3. Document Setup

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

ICT IGCSE Practical Revision Presentation Web Authoring

Module 2 (III): XHTML

Web Page Creation Part I. CS27101 Introduction to Web Interface Design Prof. Angela Guercio

Certified HTML Designer VS-1027

HTML, CSS, JavaScript

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

LESSON LEARNING TARGETS

AOS 452 Lab 4: HTML, CSS and Your Webpage

Dreamweaver MX Overview. Maintaining a Web Site

Intermediate HTML Using Dreamweaver

Introduction to Computer Science (I1100) Internet. Chapter 7

Chapter 7 Tables and Layout

HTML. LBSC 690: Jordan Boyd-Graber. October 1, LBSC 690: Jordan Boyd-Graber () HTML October 1, / 29

Web Publishing Basics I

By Ryan Stevenson. Guidebook #2 HTML

epromo Guidelines DUE DATES NOT ALLOWED PLAIN TEXT VERSION

Chapter 7 Tables and Layout

Documentation of the UJAC print module's XML tag set.

HTTP and HTML. We will use HTML as a frontend to our webapplications, therefore a basic knowledge of HTML is required, especially in forms.

HyperText Markup Language (HTML)

Intro to XHTML A Tutorial for the Beginner

Lab 4 CSS CISC1600, Spring 2012

Bixby Public Schools Course Essential Elements Grade: Desktop Publishing

Content Management System User Training

Dreamweaver CS3 Concepts and Techniques

INTRODUCTION TO HTML5! HTML5 Page Structure!

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

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

HTMLnotesS15.notebook. January 25, 2015

Web Development & Design Foundations with HTML5

HTML: The Basics & Block Elements

CS134 Web Site Design & Development. Quiz1

IT350 Web and Internet Programming. XHTML Tables and Forms (from Chapter 4 of the text 4 th edition Chapter 2 of the text 5 th edition)

Shatin Tsung Tsin Secondary School S.3 Computer and Technology Web Page Design by HTML Introduction to HTML

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

2.1 Origins and Evolution of HTML

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

Transcription:

HTML & XHTML Tag Quick Reference This reference notes some of the most commonly used HTML and XHTML tags. It is not, nor is it intended to be, a comprehensive list of available tags. Details regarding the proper use of XHTML are at the end of this document. Basic Document Tags Indicates the start and end of an HTML Document Defines the portion of the document that contains essential formatting information. The material in the head is invisible. Defines the portion of the document that contains the visible information. Body Attributes Specifies the background color <body bgcolor=?> Specifies the text color <body text=?> Specifies the color of unfollowed links. <body link=?> Specifies the color of followed links. <body vlink=?> Specifies the color of links when they are clicked. <body alink=?> NOTE: Body attributes may be combined within the body tag. Example: <body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#33cc00" alink="#ff0000"> <hl></hl>,<h2></h2>, <h3></h3>,<h4></h4>, <h5></h5>,<h6></h6> <tt></tt> <em></em> <strong></strong> <font size=?></font> <font color=?></font> Text Tags The heading tags indicate the importance of a heading ranging from the most important, h1, to the least important, h6. These specifications are intended to denote the importance data below the heading. Specifies a typewriter or teletype-like text. Creates an emphasis on text that is rendered usually as italics, but sometimes as bold depending on the browser. Creates an emphasis on text that is usually rendered as bold, but sometimes as italics depending on the browser. Specifies the font size from 1 to 7. 1 is the smallest, 7 the largest, and 3 is generally the default size. The font tag is not supported in HTML5. Use Cascading Style Sheets. Specifies font color. The font tag is not supported in HTML5. Use Cascading Style Sheets. NOTE: Font attributes may be combined within the font tag. Example: <font size="4" NOTE: The font tag is not supported in HTML5. Use Cascading Style Sheets. 1

color="#33ff00">example of combined font attributes. </font> Common Formatting Tags (HTML 4.0 & Earlier) (XHTML & HTML5) <p></p> Same Defines a paragraph. <p align=?> Same Defines paragraph alignment left, right, or center. <br> Same Inserts a line break. <blockquote></blockquote> Same Defines a block quote and indents text from both sides. Usually with some extra space above and below. <ol></ol> Same Defines the beginning and end of an ordered list. <ul></ul> Same Defines the beginning and end of an unordered list. <li></li> Same Defines the beginning and end of a line within a list. Start a line with a number in an ordered list, and with a bullet in an unordered list. Image Tags (HTML) (XHTML) <img src="name"> <img src="name" /> Places and image. <img src="name" align=?> <img src="name" align=? /> Specifies the alignment of an image; left, right, center; bottom, top, middle <img src="name" border=?> <img src="name" border=? Specifies a border around and image. /> <img src =name alt= name <img src =name alt= name > /> NOTE: Attributes within the img tag may be combined. Example in HTML: <img src="images/fisherman.jpg" width="209" height="214" alt="our Founder"> Example in XHTML: <img src="images/fisherman.jpg" width="209" height="214" alt="our Founder" /> Specifies the alternative label for an image. This is especially important for use nongraphical browsers. Horizontal Rule Tags (HTML) (XHTML) <hr> <hr /> Specifies the start of a horizontal rule. <hr size=?> <hr size=? /> Specifies the height of a horizontal rule. <hr noshade> <hr noshade /> States that the horizontal rule should have no shade. NOTE: Attributes within the horizontal rule tag may be combined. Example in HTML: <hr noshade width="75%" size="4"> Example in XHTML: <hr noshade width="75%" size="4" /> 2

<table></table> <tr></tr> <td></td> <th></th> <table border=#> <table cellspacing=#> <table cellpadding=#> <table width=? > <tr align=?> <td align=?> <tr valign=?> <td valign=?> <td colspan=#> <td rowspan=#> <td nowrap> Table Tags Specifies the beginning and end of a table. Specifies the beginning and end of a table row. Specifies the beginning and end of a table cell. Defines a table header. A normal cell with text that is bold and centered. Specifies the size of the border around a table and cells within the table. Specifies the space between cells. Specifies the amount of space between the border of a cell and the items within the cell. Specifies the width of a table in either pixels or percent. Specifies the alignment of contents in a row of cells as either left, right, or center. Specifies the alignment of contents in a cell as either left, right, or center. Specifies the vertical alignment of contents in a row of cells as either top, bottom, or middle. Specifies the vertical alignment of contents in cell as either top, bottom, or middle. Specifies the number of columns a cell will span. Specifies the number of rows a cell will span. Stops text from automatically line wrapping. XHTML can be thought of as an upgraded and stricter version of HTML 4.01, while HTML 5 is an expansion and clarification of the markup language for the Web. Neither XHTML nor HTML 5 is particularly difficult to write. However, there are some important techniques to writing properly formed code. There are some simple rules that must be followed. The most important rules are: Tags must all be in lower case. Elements must be nested correctly. Tag elements must be closed. Documents must be well-formed Examples of lower case rule: <STRONG>This is incorrect.</strong> <strong>this is correct.</strong> 3

Examples of the nesting rule: <strong><em>this is incorrect nesting.</strong><em> <strong><em>this is correct nesting.</em></strong> Examples of the closed tag rule: This horizontal rule tag is not closed- <hr> This horizontal rule tag is closed- <hr /> This image tag is not closed- <img source= /images/picture.jpg alt= Cows in a pasture > This image tag is properly closed- <img source= /images/picture.jpg alt= Cows in a pasture /> Examples of the well-formed document rule: XHTML documents must have the proper structure. This means all components must be within the opening and closing HTML tags,. Internal elements must be correctly nested and located properly. The basic components and structure of an XHTML document are- 4

XHTML/HTML 5 Syntax Rules XHTML and HTML 5 require that some basic rules of syntax be followed. As with the tag rules noted above, XHTML and HTML 5 syntax is not much more difficult that correctly formed HTML 4.0. These rules are, however, much stricter and must not be violated. These rules follow. Attributes must be quoted. The Name attribute is replaced by the ID attribute Attribute shorthand must not be used. DOCTYPE statement must be used. (The DOCTYPE statement is part of Document Type Definition, DTD, and is used to specify which syntax is used in the Web page.) Examples of the quoted attribute rule: This is incorrect- <table width=75% bgcolor=ff0000> This is correct- <table width- 75 bgcolor= ff0000 > Examples of the Name attribute replacement rule: This is incorrect- <img src= /images/cows.jpg name= photo12 /> This is the correct substitution- <img src= /images/cows.jpg id= photo12 /> Examples of the no shorthand rule: This is an example of improper shorthand- <input checked> This is the same tag correctly written without shorthand- <input checked= checked Examples of DOCTYPE statements: Invalid old-style DOCTYPE statement: <title>this is a page without a statement</title> 5

XHTML DOCTYPE statement: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <title>example of a page with a DOCTYPE statement</title> HTML 5 DOCTYPE statement: <!DOCTYPE HTML> <title>example of a page with a DOCTYPE statement</title> Note that the DOCTYPE statement goes ahead of the opening HTML tag,. The statement is not part of the HTML document and does not have a closing tag. It is used to tell a browser how to render the document. There are three XHTML DOCTYPE statements. Statement used to create clutter-free pages that must follow rules exactly when Cascading Style Sheets are used: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> Statement used when HTML presentational features are present and when it is desirable to support older browsers that do not fully understand Cascading Style Sheets: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> 6

Statement used when frames are incorporated into the design of the page (note that frames are an obsolete design technique and are not used in modern page designs): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-frameset.dtd"> HTML5 has only the one DOCTYPE statement noted above. About HTML 5 At the time of this writing, HTML 5 remains in a non-official state. Many Web page builders are starting to incorporate elements of HTML 5 into their projects. All current browsers support some HTML 5 components, but no browser supports everything outlined in the HTML 5 rules. One primary reason for this is that the HTML 5 rules are being constantly updated as problems are worked out. HTML 5 has many new tags. It is necessary to understand that the purpose of HTML is to specify what something is. For instance, HTML identifies a page element as a link, a list, a paragraph, or some other sort of object. Presentation is controlled by Cascading Style Sheets. In other words, HTML specifies that an object is, for instance, a link, but not what color the link is. HTML 5 expands the list of tags by providing more options for identification. It is now possible to identify headers, footers, sections, audio, video, and much more. The expansion of HTML tags and the ability of browsers to understand these new tags will improve the usability of the World Wide Web and result in new methods of presentation with better results. It also means that we can expect less variation in the appearance and operation of Web pages when viewed with different browsers and operating systems. 7