Objectives
- Review basic XHTML and HTML5 concepts
- Review basic CSS concepts
- Explain how XHTML/HTML5, CSS, and JavaScript are used together
- Develop a template to base most web pages on
Note in the example below how tags are used to create containers. For example, there is a body tag that starts a container (element) of content, and a corresponding /body tag that ends that container (element). Elements must be properly nested within each other. A few elements do not contain any content and therefore have no end tag. The link and meta elements are examples of that. In the example below, there are two p (paragraph) elements contained within the body element.
<!DOCTYPE html> <html lang="en"> <head> <title>Title of page</title> <meta charset="utf-8"> <link rel="stylesheet" href="style1.css"> <style> /* style rules go here */ </style> <script src="js1.js"></script> </head> <body> <p>This is where the displayable content goes.</p> <p>In this case there are two paragraphs.</p> </body> </html>
We will discuss whatever HTML tags we need in class. The basic structure tags for elements with and without content is given below:
<!-- comment (may be multiline) -->