Grow your CSS skills. Land your dream job.

Last updated on:

Test Page

A simple XHTML 1.0 Strict page structure that includes:

  • Basic CSS Reset
  • Loads jQuery from Google
  • Sets up DOM-ready block for jQuery
<!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">

<head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

     <title>Test Page</title>

     <style type="text/css">
        * { margin: 0; padding: 0;}
     </style>

     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

     <script type="text/javascript">
        $(function(){
            // Do stuff.
        });
     </script>
</head>

<body>

</body>

</html>

Comments

  1. Permalink to comment#

    Very handy! I’ve been meaning to do this myself for along time, and you saved me the effort. Just one button click!

  2. Permalink to comment#

    I don’t like that CSS reset. There are much better ones out there.

    • Totally cool, valid opinion. I’d just like to say I’ve used that baby on just about every site I’ve ever built in my life and still think it rocks =)

  3. It’s not meant to be actually used in production — like its name says, it’s for test pages. I know I sure make a whole bunch of those at the end of the week. Thanks.

  4. Esther Max
    Permalink to comment#

    I have no idea what this does
    I copy & paste it into html file
    uploaded it to my server and
    run it – nothing came out
    can you let me know what to expect?

  5. Maikel
    Permalink to comment#

    Thank you so much Chris! I will definitely use this.

Leave a Comment

Posting Code

Markdown is supported in the comment area, so you can write inline code in backticks like `this` or multiline blocks of code in in triple backtick fences like ```this```. You don't need to escape code in backticks, Markdown does that for you.

Sadly, it's kind of broken. WordPress only accepts a subset of HTML in comments, which makes sense, because certainly some HTML can't be allowed, like <script> tags. But this stripping happens before the comment is processed by Markdown (via Jetpack). It seems to me that would be reversed, because after Markdown processes code in backticks, it's escaped, thus safe. If you think you can fix this issue, get in touch!

If you need to make sure the code (typically HTML) you post absolutely posts correctly, escape it and put it within <pre><code> tags.

Current ye@r *

*May or may not contain any actual "CSS" or "Tricks".