HTML
HTML
December 1999 - January 2000: ECMAScript 3rd Edition, XHTML 1.0 (Basically
HTML tags
reformulated in XML) and, HTML 4.01 recommendations are published
The key to understanding HTML5 is that it is not one, but a group of technologies.
Within HTML5, developers have a tremendous amount of choice regarding what they
use and what they dont use
The power of HTML5 being ready for prime-time can be seen in Microsofts choice to
utilize it in Windows 8
Cons
Some work is needed to accommodate
older browsers
Document
Type Definition
DTD Examples
XHTML 1.0 Transitional DTD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
HTML5 DTD
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Page Title Goes Here</title>
<meta charset="utf-8">
</head>
<body>
... body text and more HTML5 tags go here ...
</body>
</html>
11
Title Element
Meta Element
12
<blockquote>
text goes here
</blockquote>
Phrase Elements
Indicate the context and meaning of the text
Display inline with the text
Common Phrase Elements
<b></b>
<strong></strong>
<i></i>
<em></em>
Proper Nesting
CODE:
<p><i>Call for a free quote for your web development needs:
<strong>888.555.5555 </strong></i></p>
BROWSER DISPLAY:
Call for a free quote for your web
development needs: 888.555.5555
19
Unordered List
Displays information with bullet points
Unordered List Element
<ul>
Contains the unordered list
Ordered List
Conveys information in an ordered
fashion
Ordered List Element
<ol>
Contains the ordered list
type attribute determines numbering scheme of list
default is numerals
Description List
The dt Element
<dt> tag
The dd Element
<dd> tag
Character
Code
©
<
<
>
>
&
&
Nav Element
<nav></nav>
Contains web page
documents main navigation
Footer Element
<footer></footer>
Contains the web page
documents footer
HTML5 Structural
Elements
Example:
<body>
<header> document headings go here </header>
<nav> main navigation goes here </nav>
<div> main content goes here </div>
<footer> document footer information goes here </footer>
</body>
More on Hyperlinks
Absolute link
Link to other websites
<a href="http://yahoo.com">Yahoo</a>
Relative link
Link to pages on your own site
Relative to the current page
<a href="index.html">Home</a>
Opening a Link
in a New Browser Window
The target attribute on the anchor element
opens a link in a new browser window or new
browser tab.
<a href="http://yahoo.com" target="_blank">Yahoo!</a>
Email Hyperlinks
Automatically launch the default mail
program configured for the browser
If no browser default is configured,
a dialog box is displayed
<a href="mailto:[email protected]">[email protected]</a>