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

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

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

Introduction to Web Design Curriculum Sample

Short notes on webpage programming languages

Contents. Introduction Downloading the Data Files... 2

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

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

Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates

Creating HTML authored webpages using a text editor

Introduction to XHTML. 2010, Robert K. Moniot 1

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Basic Website Maintenance Tutorial*

Web Development 1 A4 Project Description Web Architecture

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

Using Style Sheets for Consistency

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

How to Manage Your Eservice Center Knowledge Base

Creating an HTML Document Using Macromedia Dreamweaver

Website Planning Checklist

HTML, CSS, XML, and XSL

Creating a Resume Webpage with

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

ICE: HTML, CSS, and Validation

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

ICT 6012: Web Programming

Contents. Launching FrontPage Working with the FrontPage Interface... 3 View Options... 4 The Folders List... 5 The Page View Frame...

Advanced Drupal Features and Techniques

Using Adobe Dreamweaver CS4 (10.0)

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

Microsoft Expression Web Quickstart Guide

Building Your Website

Further web design: HTML forms

Web Design with Dreamweaver Lesson 4 Handout

Dreamweaver. Introduction to Editing Web Pages

Introduction Designing your Common Template Designing your Shop Top Page Product Page Design Featured Products...

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

Using an external style sheet with Dreamweaver (CS6)

Getting Started with KompoZer

Creating Personal Web Sites Using SharePoint Designer 2007

General Electric Foundation Computer Center. FrontPage 2003: The Basics

Dreamweaver CS5. Module 1: Website Development

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

Outline of CSS: Cascading Style Sheets

Jadu Content Management Systems Web Publishing Guide. Table of Contents (click on chapter titles to navigate to a specific chapter)

IAS Web Development using Dreamweaver CS4

HTML TIPS FOR DESIGNING

COMMON CUSTOMIZATIONS

Web Design I. Spring 2009 Kevin Cole Gallaudet University

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

Create Webpages using HTML and CSS

Website 101. Yani Ivanov. Student Assistant / Web Administrator

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

Designing HTML s for Use in the Advanced Editor

How to code, test, and validate a web page

EUROPEAN COMPUTER DRIVING LICENCE / INTERNATIONAL COMPUTER DRIVING LICENCE WEB EDITING

LAB MANUAL CS (22): Web Technology

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

How To Use Dreamweaver With Your Computer Or Your Computer (Or Your Computer) Or Your Phone Or Tablet (Or A Computer)

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

Umbraco v4 Editors Manual

CS412 Interactive Lab Creating a Simple Web Form

CIS 467/602-01: Data Visualization

ITNP43: HTML Lecture 4

How to Edit Your Website

FETAC Certificate in Multimedia Production. IBaT College Swords. FETAC Certificate in Multimedia Production Web Authoring Dreamweaver 3

Creating Web Pages with Dreamweaver CS 6 and CSS

A send-a-friend application with ASP Smart Mailer

Lesson Review Answers

Basic tutorial for Dreamweaver CS5

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Quick Guide to the Cascade Server Content Management System (CMS)

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

PowerPoint 2013: Basic Skills

Selectors in Action LESSON 3

Caldes CM12: Content Management Software Introduction v1.9

HTML CSS Basic Structure. HTML Structure [Source Code] CSS Structure [Cascading Styles] DIV or ID Tags and Classes. The BOX MODEL

Formatting Text in Blackboard

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

Web Publishing Basics 2

HTML Basics(w3schools.com, 2013)

{color:blue; font-size: 12px;}

MS Word 2007 practical notes

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

Microsoft Word Quick Reference Guide. Union Institute & University

Microsoft FrontPage 2003

Web Ambassador Training on the CMS

Personal Portfolios on Blackboard

Go Kiwi Internet Content Management System Version 5.0 (K5) TRAINING MANUAL

Instructions for Formatting APA Style Papers in Microsoft Word 2010

About XML in InDesign

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

JJY s Joomla 1.5 Template Design Tutorial:

How to Add a Transparent Flash FLV movie to your Web Page Tutorial by R. Berdan Oct

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

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

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.

How to create pop-up menus

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

Version 4.0. Unit 3: Web Design. Computer Science Equity Alliance, Exploring Computer Science Unit 3: Web Design 102

MAGENTO THEME SHOE STORE

Transcription:

CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout Fall 2011, Version 1.0 Table of Contents Introduction...3 Downloading the Data Files...3 Requirements...3 About Notepad++...3 About HTML and CSS...4 HTML5...4 Basic HTML Tags...4 HTML Tag Syntax...5 Head and Body Tags...5 CSS...5 CSS Syntax...5 ID and Class Selectors...5 CSS Selectors...6 Creating a New Web Page...6 Creating a Home Page...6 Basic Web Page Structure...7 Indentation...7 Adding a Page Title...7 Saving and Viewing the Web Page...8 Adding an Internal Style Sheet...8 Setting the Background Color...8 Creating a Wrapper...9 Creating a Class for the Wrapper...9 Checkpoint One...10 Creating the Web Page Structure within the Container...10 Adding a Banner...10 Adding a Navigation Bar...11 Checkpoint Two...11 Adding the Main Content Containers...12 Adding the Main Content...12 Adding the Footer...13 For additional handouts, visit http://www.calstatela.edu/handouts. For video tutorials, visit http://www.youtube.com/mycsula.

Adding Text to the Web Page...13 Checkpoint Three...14 Basic Styling of Text...14 Appendix...15 HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 2

Introduction Websites can be created by using one of many programming languages (e.g., HTML, JSP, PHP, ASP, ASP.NET, or Perl). Among those languages, HTML is the most basic text-based language that has been used in web design since 1989. HTML consists of two parts: 1) content that will be displayed in a web browser, and 2) markup or tags, which are encoded information that are generally hidden from web page viewers. This three-part handout will help users create a basic website using fundamental HTML knowledge that they can build on with more advanced techniques. The first part covers web design basics, including the use of divisions to arrange the page layout, menu bar to link multiple pages, and CSS3 to enhance web page elements. Downloading the Data Files This handout includes sample data files that can be used for hands-on practice. The data files are stored in a self-extracting archive. The archive must be downloaded and executed in order to extract the data files. The data files used with this handout are available for download at http://www.calstatela.edu/its/training/datafiles/html5p1.exe. Instructions on how to download and extract the data files are available at http://www.calstatela.edu/its/docs/download.php. Requirements A text editor, preferably Notepad++ or something similar. Notepad that is provided with Windows will also work. Notepad++ http://notepad-plus-plus.org/download http://portableapps.com/apps/development/notepadpp_portable (Portable version that can be placed on a flash drive) A current web browser (e.g., Mozilla Firefox, Google Chrome, or Internet Explorer 9). Mozilla Firefox http://www.mozilla.com/en-us/firefox/new/ Google Chrome http://www.google.com/chrome/intl/en/landing_chrome.html?hl=en Internet Explorer 9 (Only on Windows 7 and Windows Vista Service Pack 2) http://windows.microsoft.com/en-us/internet-explorer/downloads/ie NOTE: Anything below Internet Explorer 9 is not compatible with the new HTML5 features. While any on the list above is acceptable, this handout was developed based on the steps administered in Notepad++ and Mozilla Firefox. About Notepad++ Notepad++ is a lightweight, but powerful text editing tool (see Figure 1). It is built primarily for programming, not writing essays. It has built-in tag highlighting and automatic indentation which helps improve organization and readability. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 3

Figure 1 Notepad++ Program Window About HTML and CSS HyperText Markup Language (HTML) and Cascading Style Sheets (CSS) are two of the core technologies for building web pages. HTML is the language for describing the structure of web pages. CSS is the language for describing the presentation of web pages, including colors, layout, and fonts. The separation of HTML from CSS makes it easier to maintain websites and share style sheets across web pages. HTML5 HTML5 is still a work in progress and has been since June of 2004. Most of the tags that were compatible in previous versions of HTML are still compatible. However, they are no longer used because better and cleaner methods have since been found. HTML5 is still not final, but is already making a huge impact on the web. Basic HTML Tags HTML uses tags to describe the structure of web pages. Web browsers use the tags in an HTML document to interpret the content and display it as a web page. For every HTML based web page, there are several tags that are always inserted into the document: <!doctype>, <html>, <head>, <title>, and <body> (see Figure 2). Figure 2 Source Code for a Blank HTML Page HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 4

HTML Tag Syntax HTML tags are keywords surrounded by angle brackets (< and >). HTML tags normally come in pairs (e.g., <body> and </body>). The first tag in a pair is called the opening tag, and the second tag is called the closing tag. The opening tag consists of the tag name enclosed in angle brackets (e.g., <body>). The closing tag is the same as the opening tag except it has a forward slash (/) before the tag name (e.g., </body>). Head and Body Tags Web pages are divided into two sections: the head and the body. The head section is where you define the title of the web page, provide metadata about the page (e.g., keywords, character encoding), add style sheets, and insert scripts. The body section encloses the contents of the web page, the part that your visitors will see, including text, hyperlinks, images, tables, lists, etc. CSS CSS is used to control the style and layout of web pages. CSS can be added to an HTML document in the following three ways: An external style sheet (CSS file) is ideal when the style is applied to many web pages. It enables you to change the appearance and layout of an entire website just by editing one file. Each page must link to the style sheet using the <link> tag in the head section. An internal style sheet can be used if one single document has a unique style. Internal styles are defined in the head section using the <style> tag. An inline style can be used if a unique style is to be applied to one single occurrence of an element. To use inline styles, use the style attribute in the relevant tag. CSS Syntax A CSS rule is made up of two parts: a selector and one or more declarations. The selector designates or targets the HTML element you want to style. The declaration instructs the web browser to display all elements identified by the selector in a particular way. Each declaration consists of a property (the style attribute you want to change) and a value, and always ends with a semicolon. Declarations are surrounded by curly brackets. The rule in Figure 3 takes all paragraphs in the HTML document and displays them centered and in the color red. Figure 3 CSS Syntax ID and Class Selectors In addition to setting a style for an HTML element, CSS allows you to specify your own selectors called ID and class. The ID selector is used to specify a style for a single, unique element. It uses the id attribute of the HTML element, and is defined with a number sign (#). The class selector is used to specify a style for a group of elements. Unlike the ID selector, the class selector is most often used on several elements. This allows you to set a particular style for many HTML elements with the same class. The class selector uses the HTML class attribute, and is defined with a period. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 5

CSS Selectors CSS selectors offer various ways to select your HTML tags for styling (see Table 1). NOTE: For more information about CSS selectors, visit http://www.w3.org/tr/css2/selector.html. Table 1 CSS Selectors Selector Syntax Description Example ID Selector #box{property:value;} Will affect any tag with the ID box applied to it. <p id="box"> This text is affected. </p> Class Selector Tag Selector Child Selector Pseudo Selector.box{property:value;} p{property:value;} p>a{property:value;} a:hover{property:value;} Will affect any tag with the class box applied to it. Will affect all <p> tags in the HTML document. Will affect all <a> tags where the parent is a <p> tag. Will only apply the defined style on mouse over. <p class="box"> This text is affected. </p> <p> This text is affected. </p> <p> <a> This text is affected. </a> </p> <a>hover over this text.</a> Creating a New Web Page Every website is built inside a directory on a web server, and each web page is a separate file in that directory. When a visitor enters a Uniform Resource Locator (URL) in a web browser s Address bar without a file name at the end (e.g., http://www.calstatela.edu), the server looks for a default file and displays that automatically. On most web servers, the default page in a directory is named index.html. Creating a Home Page When you start building your website, you should first create your home page and name it index.html. To create a home page: 1. Launch Notepad++. In the ITS Training Program computer labs, click the Start button, point to All Programs, point to Notepad++, and select Notepad++. 2. If the text area is not blank, click the New button on the Tool bar. 3. Click the File menu and select Save As. The Save As dialog box opens. 4. In the File name box, type index.html. 5. Click the Save as type arrow and select All types (*.*) from the list. 6. Click the Desktop button in the left pane of the Save As dialog box. 7. Click the Create New Folder button, rename the new folder to Website, and then press the Enter key. 8. Double-click the newly created folder, and then click the Save button. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 6

Basic Web Page Structure This section covers the most basic elements you need to create the structure of your HTML5 document. The first thing you need to add in your document is a doctype declaration which lets web browsers know what version of the markup language the page is written in. Next, you need to add the <html> tag which tells web browsers that this is an HTML document. You also need to add the <head> tag which is a container for all the head elements, and the <body> tag which contains all the contents of an HTML document. In addition, you can define the character encoding that is used in the document (e.g., utf-8). To create a basic web page structure: 1. In Notepad++, enter the following code in the text area. <!doctype html> <html lang="en"> <head> <title></title> <meta charset="utf-8"> </head> <body> </body> </html> NOTE: Take note of the indentation. Indentation Indenting the source code of any programming language is absolutely crucial. It makes the code cleaner and much easier to read. The Tab key is most often used to indent source code. As a rule of thumb, you should indent every time you insert an element into another element; this is known as nesting. Example: <body> <p> This is a nested paragraph. </p> </body> In the example above, the <p> tag is nested in the <body> tag. Every tag in an HTML document is nested within the <html> tag, except for the <!doctype> which must be placed at the top of the HTML document, before the <html> tag. Adding a Page Title The <title> tag defines the title of the page and is required in all HTML documents. The title appears in the Title bar of web browsers. It also provides a title for the page when it is added to favorites, and displays a title for the page in search engine results. To add a page title: 1. Place the cursor between the opening <title> tag and the closing </title> tag, and type HTML Workshop. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 7

Saving and Viewing the Web Page Saving the page right away serves many purposes. First, it is a good habit to save your work periodically so that nothing is lost in the event of a system error. Second, it gives a name to the file that is being worked on so that it can be referenced from other files. Third and most importantly from a web design standpoint, it allows links from one page to another to be relative (i.e., instead of http://www.mywebsite.com/webpage_2.html, links will look like webpage_2.html). This helps make it easier to seamlessly work on a website offline as well as online, as links are referencing files in the same folder or subfolders. To save and view the web page: 1. Click the File menu and select Save. Or, press Ctrl+S. 2. Double-click the index.html file located in the Website folder to view the web page in a web browser window. Adding an Internal Style Sheet In this lesson, the <style> tag is added to the head section of the document which will later be used to add styles. To add the <style> tag: 1. Add a new line below the <meta> tag. 2. Type <style>, press the Enter key four times to create several blank lines, and then type </style> (see Figure 4). NOTE: Press the Tab key to apply the appropriate indentation. Figure 4 <style> Tag Added to the Head Section Setting the Background Color The background of a page sets the undertone for the entire website. When setting a background, it is important to have something simple. The background should enhance the page content, not overpower it. Two types of backgrounds can be used: a single solid color or an image. In this lesson, a background color is set using CSS. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 8

To set a background color: 1. Place the cursor on the first blank line between the opening <style> tag and the closing </style> tag, and then type the following CSS rule to change the background color to light grey. body{ background-color:#cccccc; } NOTE: Be sure to apply the appropriate indentation; line up the closing curly bracket with the body selector (see Figure 5). Figure 5 CSS Rule for Setting the Background Color 2. To see the result, save the file, and then refresh the page in the browser window. Creating a Wrapper Creating a wrapper is an essential part of creating any web page. The wrapper helps contain all of your content and gives a more reliable reference for positioning elements on your page. To create a wrapper: 1. Place the cursor on the blank line between the opening <body> tag and the closing </body> tag, and then type the following code. <div class="wrapper"> </div> NOTE: Be sure to apply the appropriate indentation. Also, create several blank lines between the opening and closing tags for content. Creating a Class for the Wrapper A div element with a wrapper class does not do anything if the wrapper class is not defined. To define a new class: 1. Add a new line before the closing </style> tag, and then type the following CSS rule. div.wrapper{ width:1000px; height:800px; margin-left:auto; margin-right:auto; border:1px solid black; } NOTE: The width property sets the width of the div element to 1,000 pixels; height sets the height of the element to 800 pixels; margin-left:auto; and margin-right:auto; are used to center the element; and border creates a border around the element that is 1 pixel wide, solid (as opposed to dotted or dashed) and black. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 9

NOTE: Using margin-left:auto; and margin-right:auto; is currently the most effective and compatible way to center elements on a web page. 2. To see the result, save the file, and then refresh the page in the browser window. Checkpoint One This is the first of three checkpoints within this handout. Make sure that the document that is being created is similar to the checkpoint_1.html file located in the data files folder (see Figure 6). Figure 6 Source Code in the checkpoint_1.html File Creating the Web Page Structure within the Container Up to this point, the web page that is being created has a colored background and the outline of a box, which is the wrapper or container. In this section, a banner and a navigation bar will be added to the page. Adding a Banner A div element can be placed at the top of the web page to serve as a container for text or an image that represents the website. To add a banner: 1. Place the cursor on the blank line between the opening <div class="wrapper"> tag and the closing </div> tag, and then type the following code. <div class="banner"></div> HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 10

2. To define a new class for the banner, add a new line before the closing </style> tag, and then type the following CSS rule. div.banner{ width:750px; height:90px; position:relative; top:0px; margin-left:auto; margin-right:auto; border:1px solid black; } NOTE: The position:relative; declaration is a bit complex and is used to give you more of a choice on how you want the positioning of your element to react to its surroundings; top:0px; moves the element so that the top of the element is at the top of the parent element, which in this case is the wrapper. Adding a Navigation Bar Another div element can be placed below the banner to serve as the navigation bar to reach other pages on your website. To add a navigation bar: 1. Add a new line after <div class="banner"></div>, and then type the following code. <div class="nav"></div> 2. To define a new class for the navigation bar, add a new line before the closing </style> tag, and then type the following CSS rule. div.nav{ background-color:#5c5c5c; width:750px; height:30px; margin-left:auto; margin-right:auto; position:relative; top:3px; border:1px solid black; } NOTE: By declaring position:relative;, the navigation bar will appear naturally after the banner. Also, 3 pixels of space are added between the top of the navigation bar and the bottom of the banner. 3. Press Ctrl+S to save the changes. Checkpoint Two This is the second checkpoint within this handout. Make sure that the document that is being created is similar to the checkpoint_2.html file located in the data files folder (see Figure 7). NOTE: The code shown in Figure 7 is only the code added since checkpoint one. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 11

Figure 7 Source Code in the checkpoint_2.html File Adding the Main Content Containers Up to this point, the web page that is being created includes a container and the upper portion of the page. In this section, additional important containers will be added to the page. Adding the Main Content In this lesson, a div element is placed below the navigation bar to serve as a container for the main content of the web page. To add the main content: 1. Add a new line after <div class="nav"></div>, and then type the following code. <div class="main"></div> 2. To define a new class for the main content, add a new line before the closing </style> tag, and then type the following CSS rule. div.main{ position:relative; top:6px; width:750px; height:600px; margin-left:auto; margin-right:auto; border:1px solid black; background-color:white; } NOTE: By declaring position:relative;, the main content will appear naturally after the navigation bar. Also, 6 pixels of space are added between the top of the main content and the bottom of the navigation bar. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 12

Adding the Footer A footer can be added at the bottom of the web page to help give some background information about the page or to provide a large area for useful links. To add a footer: 1. Add a new line after <div class="main"></div>, and then type the following code. <div class="footer"></div> 2. To define a new class for the footer, add a new line before the closing </style> tag, and then type the following CSS rule. div.footer{ background-color:black; height:180px; width:752px; margin-left:auto; margin-right:auto; position:relative; bottom:8px; z-index:1; color:white; } NOTE: The z-index:1; declaration gives the footer a z-index of 1, meaning that it will be above all other elements. The z-index is a way to change the layering of elements without having to rearrange the <div> tags. Elements without a z-index defined in the style default to 0. Adding Text to the Web Page Most web pages are made up of a lot of text. There are many things you can do to make your web page text look more interesting. To add text: 1. Add a new line between the opening <div class="main"> tag and the closing </div> tag, and then type the following code. <p class="welcome"> This is some text. </p> NOTE: The <p> tag defines a paragraph. 2. To define a new class for the paragraph, add a new line before the closing </style> tag, and then type the following CSS rule. p.welcome{ margin-left:14px; margin-right:15px; text-indent:16px; } NOTE: The CSS rule above will only affect <p> tags with the class welcome applied to them. 3. To see the result, save the file, and then refresh the page in the browser window. HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 13

Checkpoint Three This is the third checkpoint within this handout. Make sure that the document that is being created is similar to the checkpoint_3.html file located in the data files folder (see Figure 8). NOTE: The code shown in Figure 8 is only the code added since checkpoint two. Figure 8 Source Code in the checkpoint_3.html File Basic Styling of Text HTML text can be formatted and stylized much like in other programs such as Microsoft Word. To add more styles to the text, try adding some of the declarations listed below to the text class (p.welcome). text-decoration:underline; text-decoration:line-through; text-decoration:overline; color:red; color:blue; color:#00ff00; font-size:20px; HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 14

Appendix Table 2 Commonly Used HTML Tags Tag <a> <b> <body> <br> <em> <form> <h1> to <h6> <head> <hr> <html> <i> <img> <input> <li> <menu> <ol> <p> <table> <td> <th> <title> <tr> <ul> Description Defines a hyperlink. Makes text bold. Defines the document's body. Inserts a single line break. Renders as emphasized text. Used to create an HTML form. Define headings. Container for all the head elements. Creates a horizontal line. Tells the browser that this is an HTML document. Renders text in italics. Defines an image. Specifies an input field. Defines a list item. Used to create a list of menu choices. Defines an ordered list. Defines a paragraph. Defines an HTML table. Defines a standard cell in an HTML table. Defines a header cell in an HTML table. Defines the title of the document. Defines a row in an HTML table. Defines an unordered (bulleted) list. Table 3 Commonly Used HTML Color Codes Color Code Color Code Black #000000 Green #008000 Silver #C0C0C0 Lime #00FF00 Gray #808080 Olive #808000 White #FFFFFF Yellow #FFFF00 Maroon #800000 Navy #000080 Red #FF0000 Blue #0000FF Purple #800080 Teal #008080 Fuchsia #FF00FF Aqua #00FFFF HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 15

For more HTML color codes, visit: Webmonkey (http://www.webmonkey.com/2010/02/color_charts/) Colourlovers (http://www.colourlovers.com/blog/2007/06/30/ultimate-html-color-hexcode-list/) ComputerHope (http://www.computerhope.com/htmcolor.htm) HTML5 and CSS3 Part 1: Using HTML and CSS to Create a Website Layout 16