HTML & XHTML Tag Quick Reference



Similar documents
Introduction to XHTML. 2010, Robert K. Moniot 1

Chapter 2 HTML Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Computer Applications Technology

An Attribute is a special word used inside tag to specify additional information to tag such as color, alignment etc.

CSE 3. Marking Up with HTML. Tags for Bold, Italic, and underline. Structuring Documents. An HTML Web Page File

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

New Perspectives on Creating Web Pages with HTML. Considerations for Text and Graphical Tables. A Graphical Table. Using Fixed-Width Fonts

HTML TIPS FOR DESIGNING

Introduction to Web Design Curriculum Sample

HTML, CSS, XML, and XSL

ICT 6012: Web Programming

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS COPYRIGHT 2013 TERRY ANN MORRIS, ED.D

CS412 Interactive Lab Creating a Simple Web Form

Creating HTML authored webpages using a text editor

How to Create an HTML Page

HTML Tables. IT 3203 Introduction to Web Development

Caldes CM12: Content Management Software Introduction v1.9

Website Planning Checklist

HTML Forms and CONTROLS

WEB DESIGN LAB PART- A HTML LABORATORY MANUAL FOR 3 RD SEM IS AND CS ( )

So we're set? Have your text-editor ready. Be sure you use NotePad, NOT Word or even WordPad. Great, let's get going.

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

HTML Overview. With an emphasis on XHTML

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

Creating a Resume Webpage with

LAB MANUAL CS (22): Web Technology

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Website 101. Yani Ivanov. Student Assistant / Web Administrator

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

Advanced Drupal Features and Techniques

ITNP43: HTML Lecture 4

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Developer Jr - Newbie Course

BLACKBOARD 9.1: Text Editor

WYSIWYG Editor in Detail

BlueHornet Whitepaper

Urban Planet Website Content Management System. Step-by-Step Instructions

HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout

Tutorial 5. Working with Web Tables

Campaign Guidelines and Best Practices

Web Design with Dreamweaver Lesson 4 Handout

About webpage creation

Introduction to HTML/XHTML Handout Companion to the Interactive Media Center s Online Tutorial

Creating Web Pages with HTML Simplified. 3rd Edition

Advanced Web Design. Zac Van Note.

Creative Guidelines for s

HTML. A computer network is a collection of computers linked through cables or wireless means.

How to code, test, and validate a web page

General Electric Foundation Computer Center. FrontPage 2003: The Basics

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

COMMON CUSTOMIZATIONS

ICE: HTML, CSS, and Validation

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Creating an HTML Document Using Macromedia Dreamweaver

HT H ML B as a ics c 1

Web Development 1 A4 Project Description Web Architecture

Using Adobe Dreamweaver CS4 (10.0)

Help on Icons and Drop-down Options in Document Editor

Using an external style sheet with Dreamweaver (CS6)

Lesson Review Answers

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 1

HTML Lesson 7. Your assignment:

ADOBE DREAMWEAVER CS3 TUTORIAL

Cut-to-the-Chase Series Web Foundations. HTML Assignment. By Eric Matthews Visit us at:

WHITEPAPER. Skinning Guide. Let s chat Velaro info@velaro.com by Velaro

How to Manage Your Eservice Center Knowledge Base

Creating Web Pages with Microsoft FrontPage

webpage4 Manual Last changed August 11, 2008

Formatting Text in Blackboard

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Creating Accessible Documents in Word 2011 for Mac

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

Using Style Sheets for Consistency

Basic tutorial for Dreamweaver CS5

LaGuardia Community College Thomson Ave, Long Island City, New York Created by ISMD s Dept. Training Team. Overview

Accessibility in e-learning. Accessible Content Authoring Practices

Mastering the JangoMail EditLive HTML Editor

CIS 467/602-01: Data Visualization

Further web design: HTML forms

Advanced HTML Authoring Using Tables

QQ WebAgent Quick Start Guide

By Glenn Fleishman. WebSpy. Form and function

Basic Website Maintenance Tutorial*

Joomla Article Advanced Topics: Table Layouts

Contents. Downloading the Data Files Centering Page Elements... 6

XHTML BASICS. Institute of Finance Management CIT Department Herman Mandari

Fast track to HTML & CSS 101 (Web Design)

Talking: Web. Web design is the hardest thing you will ever do in life. At least when you do it for the first time. Home Page. Talking: Resources

CHAPTER 10. When you complete this chapter, you will be able to:

04 Links & Images. 1 The Anchor Tag. 1.1 Hyperlinks

Drupal Training Guide

Create a Web Page with Dreamweaver

Excel 2007: Basics Learning Guide

Atable is an orderly arrangement of data distributed across a grid of rows and

Web Publishing Basics 2

Getting Started with KompoZer

Madison Area Technical College. MATC Web Style Guide

Professional & Workgroup Editions

Website Development Komodo Editor and HTML Intro

Web page design in 7 days!

Transcription:

HTML & XHTML Tag Quick Reference Interactive Media Center 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. <html></html> <head></head> <body></body> 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 <body bgcolor=?> Specifies the background color <body text=?> Specifies the text color <body link=?> Specifies the color of unfollowed links. <body vlink=?> Specifies the color of followed links. <body alink=?> Specifies the color of links when they are clicked. NOTE: Body attributes may be combined within the body tag. Example: <body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#33cc00" alink="#ff0000"> Text Tags The heading tags display text in sizes ranging from the <hl></hl>,<h2></h2>, largest, h1, to the smallest, h6. These specifications <h3></h3>,<h4></h4>, are intended to denote the importance data below the <h5></h5>,<h6></h6> heading. <b></b> Specifies bold text. <i></i> Specifies italics text. <tt></tt> Specifies a typewriter or teletype-like text. Creates an emphasis on text that is rendered usually as <em></em> italics, but sometimes as bold depending on the browser. Creates an emphasis on text that is usually rendered as <strong></strong> bold, but sometimes as italics depending on the browser. Specifies the font size from 1 to 7. 1 is the largest, 7 <font size=?></font> the smallest, and 3 is generally the default size. <font color=?></font> Specifies font color. NOTE: Font attributes may be combined within the font tag. Example: <font size="4" color="#33ff00">example of combined font attributes. </font> 9/03 R. Lipera v.2.2 1

Common Formatting Tags (HTML) (XHTML) <p></p> Defines a paragraph. <p align=?> Defines paragraph alignment left, right, or center. <br> <br /> Inserts a line break. <blockquote></blockquote> Defines a block quote and indents text from both sides. Usually with some extra space above and below. <ol></ol> Defines the beginning and end of an ordered list. <ul></ul> Defines the beginning and end of an unordered list. <li></li> 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) > /> Places and image. align=?> border=?> <img src =name alt= name > align=? /> border=? /> <img src =name alt= name /> NOTE: Attributes within the font tag may be combined. Specifies the alignment of an image; left, right, center; bottom, top, middle Specifies a border around and image. Specifies the alternative label for an image. This is especially important for use nongraphical browsers. 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" /> 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 width=?> <hr width=? /> Specifies the width of a horizontal 9/03 R. Lipera v.2.2 2

rule in either pixels or percent. <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" /> <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. 9/03 R. Lipera v.2.2 3

XHTML can be thought of as an upgraded and stricter version of HTML 4.01. It is not much more difficult to write XHTML than it is to write properly formed HTML. There are some simple rules that must be followed. The most important rules are: XHTML tags must all be in lower case. XHTML elements must be nested correctly. All XHTML tag elements must be closed. Documents written in XHTML must be well-formed. Examples of lower case rule: <STRONG>This is incorrect.</strong> <strong>this is correct.</strong> 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 > This image tag is properly closed- <img source= /images/picture.jpg alt= Cows /> 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, <html></html>. Internal elements must be correctly nested and located properly. The basic components and structure of an XHTML document are- <html> <head> </head> <body> </body> </html> 9/03 R. Lipera v.2.2 4

XHTML Syntax Rules XHTML requires that some basic rules of syntax be followed. As with the tag rules noted above, XHTML syntax is not much more difficult that correctly formed HTML. 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: <html> <head> <title>this is a page without a statement</title> </head> <body> </body> </html> 9/03 R. Lipera v.2.2 5

PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html> <head> <title>example of a page with a DOCTYPE statement</title> </head> <body> </body> </html> Note that the DOCTYPE statement goes ahead of the opening HTML tag, <html>. 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 DOCTYPE statements. Statement used to create clutter-free presentations and when Cascading Style Sheets are used: 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 understand Style Sheets: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> Statement used when frames are incorporated into the design of the page: PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-frameset.dtd"> 9/03 R. Lipera v.2.2 6