Here is a checklist you should always refer to before you submit any of your assignments. It will keep you from making many small nitpicky mistakes that you would otherwise lose points on.
Two important notes:
Conventions: Some of the items here are NOT official HTML-5 requirements. However, many of them are adhered to by professional programmers and are considered to be both good habits and good conventions. So please adhere to these conventions as if they were part of the official standard. One example is the 'alt' attribute for images.
You only need to do items once they have been discussed in lecture: The first several times you use this checklist, most of the items will not mean anything to you. Various requirements will be added as we progress. In other words, you are not required to meet a requirement if it has not yet been discussed in the course. However, once a topic has been covered in lecture, you must meet that requirement.
All pages must include the html
, head
, title
, body
, DOCTYPE
, and, charset
(meta) tags.
Use whitespace (but don't overdo it!) For example, you rarely need more than one blank line between sections. See the section below titled "Some Notes on Whitespace".
Naming convention for file names (this includes all file names such as your html files, images, css files, etc): Name should be all lower-case, spaces should be separated with underscores.
Images must always include the alt
attribute.
Prompts for form elements should be placed inside a <label>
tag. Note: I realize that not all of my examples include this tag. This is to reduce a little bit of code clutter when I am trying to demonstrate certain concepts. However, it is a habit that you should definitely try to adhere to.
Any time you have an id
attribute, you should identify it using the proper conventions (i.e. camel case, prefixes). E.g. id="txtFirstName"
. Note: Do not confuse this convention for naming ID attributes, with our naming convention for file names!
Colors should be specified using their HEX codes (e.g. #FF0000
).
You should never name any file index.html
. That particular file name has a special usage and should only be used in specific situations.
Once semantic tags have been discussed (around week 4), your pages should always be divided into at least 2 semantic sections, header
and main
.
All <div>
tags should be named using the id
attribute.
Every time you read in a numeric value from a form, you must invoke the parseInt()
for integers or parseFloat()
(for decimals) on that value.
Naming conventions for JavaScript variable and function names: camel-case (e.g. thisIsOneVariable
; Be sure to follow official JS rules as well such as not beginning with a digit, etc.
All images must be stored in the images
subfolder of your site. NOTE: This is NOT required until we have discussed creating subdirectories. It is possible we will not get to this topic in the course.
Your documents must show proper use of whitespace. It does not have to be exactly the way mine is, but it should be close. As some examples:
Your tags inside the <head>
section should be indented.
If you have some paragraphs (i.e. <p>
tags) on your page, you should probably place a blank line between each paragraph in your code as well.
Do NOT have multiple empty lines in your document. It's okay to have a blank line between sections, but there should never be 2 or more blank lines. Whitespace is good -- but too much whitespace is not good!
Remember: Whitespace all about making your code as easy to read and follow as possible!
For examples, look at any of my code examples in the course. They all show proper use of whitespace.