Website Creation in Plain English Example Pages
These pages include every single example shown in the book. They are here so you can view them and examine their coding.
- Home
- Outline
- W3C Markup Validator
- Examples
- Your First Webpage
- Page with
h1
element added. 1
- Page with
p
elements added. 1
- Page with missing
h1
end tag. 2
- Page with
em
elements added. 1
- Page with
strong
elements added. 1
- Hilighting the code of your first webpage. 3
- Attributes
- Demonstration of the
title
attribute. 1
- Demonstration of the
style
attribute. 1
- Demonstration of the
lang
attribute. 1 4
- Demonstration of the
dir
attribute. 1 4
- Hyperlinks
- A hyperlink within a paragraph. 1
- Several hyperlinks, and two attempts that are not hyperlinks. 2 5
- Empty Elements And Semantics
- Horizontal Rule. 1
- Image. 1
- The difference between the
em
and cite
elements. 1
- Inline Elements
span
element.
abbr
element.
acronym
element.
cite
element.
code
element.
dfn
element.
em
element.
kbd
element.
samp
element.
strong
element.
var
element.
b
element.
big
element.
i
element.
small
element.
tt
element.
a
element.
bdo
element. 4
br
element.
button
element.
del
and ins
elements.
img
element.
q
element.
sub
element.
sup
element.
- Block Elements
p
element.
address
element.
- Header elements.
hr
element.
pre
element.
div
element.
blockquote
element.
- Inline
del
and ins
elements.
- Block
del
and ins
elements.
- Lists
- Unordered List.
- Ordered List.
- Definition List.
- Unordered Links List. 6
- Ordered Links List. 6
- Definition Links List.
- Assorted Nested Lists.
- Chapter Outline.
- Image Maps
- Example Image Map (using areas).
- Example Image Map (using a list of anchor elements). 7
- HTML Objects
- Embedded Webpage.
- Embedded SVG Image With Wrong Data Type (May Not Appear As Image). 7
- Embedded SVG image. 7
- Embedded Flash Animation.
- Embedded Flash Animation With High Resolution.
- Embedded Flash Animation With Low Resolution.
- Tables
- Example Simple Table.
- Example Simple Table With Borders.
- Example Complex Table.
- Example Complex Table With Borders.
- CSS Selectors
- Webpage with the third-level header element controlled by CSS.
- Webpage with the appearance of a class of elements controlled by CSS.
- Webpage with the appearance of a single element specified by an
id
attribute controlled by CSS.
- Webpage using the Universal Selector
- Webpage using CSS targeting elements with the
lang
attribute. 8
- Webpage using CSS targeting elements with the
lang
attribute, with an exception made for lang
attributes with the value en
. 8
- Webpage using the :first-child psuedo-class. 8
- Webpage using the :nth psuedo-class. 8
- Webpage using the :lang() psuedo-class. 8
- Webpage using the :first-letter and :first-line psuedo-elements. 8
- Webpage using the :before and :after psuedo-elements. 8
- Webpage using nesting to determine color of element. 8
- Webpage using nesting to determine text decoration of inserted and deleted paragraphs.
- Webpage centering all header elements.
- CSS Value Types
- Webpage demonstrating absolute font sizes with different measurements.
- Webpage where you can try various colours with RGB and Hex colours. 3
- Webpage where you can try various colours with HSL colours. 3 7 8 9
- Font And Text
- Webpage demonstrating various font families. 4
- Webpage demonstrating the absolute font-size keywords.
- Webpage demonstrating incremental fonts.
- Webpage demonstrating indentation.
- Webpage demonstrating alignment.
- Webpage demonstrating text decoration. 8
- Schrödinger's Cat. 8
- Webpage demonstrating text capitalization.
- Webpage demonstrating text colour.
- Webpage demonstrating line spacing set to different measurements but same amount.
- Webpage demonstrating letter and word spacing.
- Borders, Margins, And Padding: The CSS Box Model
- Webpage demonstrating borders.
- Webpage demonstrating padding.
- Webpage demonstrating margins.
- CSS Backgrounds
- Webpage demonstrating background colours.
- Webpage demonstrating a background image.
- Webpage demonstrating background image repetition.
- Webpage demonstrating background image position.
- Webpage demonstrating background collective property.
- Webpage demonstrating a CSS rollover. 8
- CSS For Lists
- Webpage demonstrating list-style-type:none (no list marker).
- Webpage demonstrating list-style-type:disc.
- Webpage demonstrating list-style-type:circle.
- Webpage demonstrating list-style-type:square.
- Webpage demonstrating list-style-type:decimal.
- Webpage demonstrating list-style-type:decimal-leading-zero. 8
- Webpage demonstrating list-style-type:upper-roman.
- Webpage demonstrating list-style-type:lower-roman.
- Webpage demonstrating list-style-type:upper-alpha (AKA upper-latin).
- Webpage demonstrating list-style-type:lower-alpha (AKA lower-latin).
- Webpage demonstrating list-style-type:lower-greek. 8
- Webpage demonstrating list-style-type:armenian.8
- Webpage demonstrating list-style-type:georgian. 8
- Webpage demonstrating the position of the list style.
- Webpage demonstrating a list using an image.
- Counters and Other CSS-Generated Content
- Webpage demonstrating how to specify content in a stylesheet. 8
- Webpage demonstrating that HTML-style entities don't work in CSS. 8
- Webpage demonstrating the proper way to create a CSS entity. 8
- Webpage demonstrating that CSS entities can go awry. 4 8
- Webpage demonstrating CSS concatenation. 8
- Webpage demonstrating CSS concatenation with entities. 8
- Webpage demonstrating the incrementation of CSS counters. 8
- Webpage demonstrating the use of attributes. 4 8
- Webpage demonstrating quotation marks for different languages. 8
- Arranging the Page
- Webpage demonstrating how different elements are displayed.
- Webpage demonstrating how different elements display content that overflows their bounds.
- Webpage demonstrating absolutely-positioned elements.
- Webpage demonstrating fixed-positioned elements. 8 (You may want to resize the window until a scrollbar appears.)
- Webpage demonstrating relatively-positioned elements.
- Webpage demonstrating floated elements.
- Webpage demonstrating how elements clear floated elements.
- Webpage demonstrating how absolute positioning can allow you to create decorative navigation menus.
- Dynamic Behavior And Scripting
- Webpage with a script that creates a popup alert box 3
- HTML DOM
- Webpage with a script that retrieves an attribute value. 3
- Webpage with a script that retrieves an element's text node. 3
- Webpage with a script that retrieves an element's last child node (in this case, a text node). 3
- Webpage with a script that changes the text of an element. 3
- JavaScript Variables
- Webpage demonstrating JavaScript rewriting the content of an element. 3
- Text
- Webpage demonstrating the dangers of concatenation. 3
- Webpage with corrected concatenation. 3
- Webpage demonstrating the importance of order in concatenation. 3
- Webpage demonstrating how to add text to an existing string. 3
- Webpage demonstrating the split() method. 3 10
- Webpage demonstrating the substr() method. 3
- Webpage demonstrating the substring() and slice() methods. 3
- Webpage demonstrating the toLowerCase() and toUpperCase() methods. 3
- Webpage demonstrating the indexOf(), lastIndexOf(), and search() methods. 3 10
- Webpage demonstrating the match() method. 3
- Webpage demonstrating the replace() method. 3
- Regular Expressions
- Regular expression using the match() method. 3
- Regular expression using the search() method. 3
- Regular expression using the replace() method. 3
- Regular expression using the test() method. 3
- Regular expression with two subpatterns. 3
- Seeking the work "expression" with either lower- or upper-case "E". 3
- The patterns of the Canadian Postal Code. 3
- Demonstrating A Regular Expression With Subpatterns
- Numbers and Math
- Webpage demonstrating erroneous math equation. 3
- Webpage demonstrating corrected math equation. 3
- Webpage demonstrating various constants associated with the Math object. 3
- Webpage demonstrating the clash between addition and concatenation. 3
- Webpage demonstrating how to make sure a number is treated as a number. 3
- Webpage demonstrating Math.E, Math.PI, Math.SQRT2, and being ridiculous therewith. 3
- Webpage demonstrating rounding. 3
- Webpage demonstrating rounding up. 3
- Webpage demonstrating rounding down. 3
- Webpage demonstrating rounding to a multiple of 10. 3
- Rounding to a fixed decimal point or a multiple of 10. 3
- Error multiplying 0.6 × 3. 3
- Decisions
- An if statement that proves true. 3
- An if statement that proves false. 3
- An if/else statement that proves true. 3
- An if/else statement that proves false. 3
- An if/else statement that proves false for a different reason. 3
- An if/else if/else statement whose first condition proves true. 3
- An if/else if/else statement whose second condition proves true. 3
- An if/else if/else statement where both conditions prove false. 3
- A nested if statement, where the first condition proves true. 3
- A nested if statement, where the first condition proves false, so the if statement nested in the else part comes into play. The first condition of that proves true. 3
- A nested if statement, where the first condition proves false, so the if statement nested in the else part comes into play. The second condition of that proves true. 3
- A nested if statement, where the all conditions prove false. 3
- A switch statement, which contains an error. 3
- A corrected switch statement. 3
- Another switch statement, which compares strings. 3
- Loops
- A page using a while loop. 3
- A page using a while loop whose condition automatically proves false. 3
- A page using a do-while loop whose condition automatically proves false. 3
- A page using a for loop. 3
- A page using a for loop to access elements of an array. 3
- A page using a for loop to access child nodes of a
<p>
element. 3
- A page using a for-in loop to access elements of an array. 3
- A page using nested loops to access elements of a two-dimensional array. 3
- Webpage demonstrating the split() method, now using loops. 3 11
- Webpage demonstrating the indexOf(), lastIndexOf(), and search() methods, now using loops. 3 11
- Procedures
- A Function that extracts the text of a paragraph. 3
- A webpage with HTML, CSS, and JavaScript all in one file. 3
- A webpage with HTML, CSS, and JavaScript in separate files.
- HTML 3
- CSS 9
- The JavaScript Function 9
- The JavaScript Function calls 9
- A script that displays the limited scope of variables. 3 12
- A script where a function changes a variable. 3
- A webpage with a recursive function
- HTML 3
- CSS 9
- The JavaScript Function 9
- JavaScript Objects
- Webpage demonstrating a directly-created object. 3
- Webpage demonstrating how to add a property to an existing element (this time, the property "extra" to an element node). 3
- Webpage demonstrating the short-hand creation of an object. 3
- Webpage demonstrating objects created through a template. 3
- Webpage demonstrating a method that can be accessed through an object or on its own. 3
- Webpage demonstrating a method that can be must be accessed through an object, but an attempt is made to access it on its own. 3 12
- Webpage demonstrating a method that can be must be accessed through an object. 3
- Webpage demonstrating nested objects. 3
- Webpage demonstrating objects and loops. 3
- Events
- Webpage demonstrating 4 events associated with one element (assigned through event attributes). 3
- Webpage demonstrating 4 events associated with one element (assigned through JavaScript). 3
- Webpage demonstrating 4 buttons assigned click events through a loop. 3
- Webpage demonstrating a 4 × 4 table of buttons assigned click events through nested loops. 3
- The function used by all these examples. 9
- Click events assigned through an object template. 3
- Style
- A collapsible menu. Click to expand submenus, doubleclick to collapse. 3
- A collapsible menu. Click the buttons to expand and collapse submenus. 3
- Dropdown menus. Hover over the menus to make them appear. 3
- A tabbed menu. Click the tabs to make the respective h2 elements appear or disappear. 3
- Another version of the tabbed menu. 3
- HTML Forms
- A list of input types. 3
- Text and password inputs. 3
- Text and password inputs, and a script which retrieves their value. 3
- Radio buttons and checkboxes. 3
- Two groups of radio buttons. 3
- Radio buttons and checkboxes, and a script which retrieves their value. 3
- Button and reset button. 3
- Other types of inputs. 3
- A textarea, and a script which retrieves its value. 3
- A dropdown menu, and a script which retrieves its value. 3
- A dropdown menu, and a script which retrieves its value automatically. 3
- A previous form (the checkbox-radio demonstration) arranged and labelled using fieldset, label, and legend elements. 3
- Manipulate the form by changing the input. 3
- Enable or disable input. 3
- DOM Manipulation
- Generates a webpage entirely from JavaScript. 3
- Appends paragraphs based on what's inside a textarea element. 3
- Removes a paragraph, and places it somewhere else in the DOM. 3
- Replaces one element node with another within the DOM. 3
- Sets a paragraph element's attribute. 3
- Frames
- View the book in frames mode.
- View the book in frames mode with book title.
- A demonstration of an inline frame.
- Coding Shortcuts And Other Things
- A demonstration of HTML conditionals (This page works differently in Internet Explorer than in other browsers).
- XML XHTML, and HTML5
- A diagram created with SVG, a type of XML. 7 9
- A webpage created with SVG, XHTML, and MathML. 7 9
- Tips And Tricks Of Website Design
- The Horrors Page. WARNING! This page uses flashing colors and images. View at your own risk.
- A simple page with an absolutely-positioned menu.