You are currently browsing the page Basic Page in the HTML category.

Basic Page

First, make sure you've picked the correct doctype. The basic structure of a page looks like this:

<!-- Insert doctype here -->
<html>
<head>
<title>Your page title</title>
</head>
<body>
// Everything here will show up, this is where you put your contents.
</body>
</html>

  • html marks the beginning of the page. It indicates that it is a HTML document.
  • head is where you put informations about your page. Anything put here is invisible and don't show up when your page is loaded. It's mostly used for metatags, stylesheets, and so on. This is where you put your page title, between the title element.
  • body is the container for all your contents and design.

In order to produce valid codes, there are a few rules to respect:

  1. Elements must be in lowercase.
  2. The codes need to be properly nested. (In short, your codes must be "symmetrical")
  3. "Empty" elements such as br, hr, input, img, meta, etc. must be closed too.
  4. Attributes values must be put between quotation marks.
  5. You must put alt="" in images and area tags.

Print This Post Print This Post



Sponsors


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It