Programming Examples
Reference the links below to help you get a better understanding of how to code
HTML, XHTML, CSS, and JavaScript.
Additional examples will be posted as we move through the semester.
To view the code behind each page, go to the page, click on "View"
in the top navigation and select "Source". Alternatively, you can go to the page,
right click somewhere within the webpage (be sure not to right click on an image or a
link) and select "View Source" from the menu. Note: This may
differ depending on the browser you are using. The key is to look
for the word "Source".
World Wide Web Consortium (W3C)
XHTML Validator
CSS Validator
Validation Code
- HTML5
<!DOCTYPE html>
- Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- Transitional
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="ltr">
Additional Resources