CPSCI 105: Explorations in Computer Science

HTML Junk Example

A Junk Tag

Here's the HTML for the next paragraph:

<p>
Here is a <junk>junk element</junk>.
This is the next sentence.
</p>

Here is a junk element. This is the next sentence.


A Junk Attribute

Here's the HTML for the next paragraph:

<p>
Here is a <span attribute="value">legal tag with an illegal attribute</span>.
This is the next sentence.
</p>

Here is a legal tag with an illegal attribute. This is the next sentence.


Forgetting to close a tag

Here's the HTML for the next paragraph:

<p>
Here is a <span title="legal tag" legal tag with a legal attribute</span>
but no greater-than completing the opening tag.
</p>

Here is a but no greater-than completing the opening tag.

Here is the paragraph with the greater-than included:

Here is a legal tag with a legal attribute but no greater-than completing the opening tag.


Note

This page won't validate because it contains illegal HTML. Notice, however, that it displays just fine in a browser.


[ Return to the CPSCI 105-01 homepage ]

Brian J. Rosmaita <contact me>
This page was last modified Wednesday, 31 January 2007 at 17:44 UTC.
Valid XHTML 1.0 ! Valid Cascading Style Sheets! This page is in AAA Conformance with the Web Content Accessibility Guidelines