HTML reference

From WikiHack

Jump to: navigation, search

This page provides the basis of a reference for writing HTML code based on a guide by hackeri.

Basics

  • HTML documents have a .html or .htm extension.
  • The standards an HTML document must conform to are defined by a DOCTYPE.
  • HTML files are made up of elements, defined by tags.
  • Tags are defined by characters enclosed in angle brackets < >.
  • Tags normally come in pairs, an opening <tag> and a closing </tag>.
  • Tags can have attributes, in the form variable="value" enclosed within the starting tag.
  • Attributes can be enclosed in double or single quotes.


Useful Tags

<!-- denotes a comment which will not be displayed -->
<p> displays a paragraph of text </p>
<h1> displays the biggest heading </h1>
<h6> down to h6, which display the smallest heading </h6>
<a href="http://how2hack-security.net"> hyperlink to another document </a>
<img src="a link to an image" /> displays an image - note this does not have a closing tag.

<script type="text/javascript"> allows javascript (or other scripting languages) to be written in as part of the document </script>
<style> allows CSS to be written as part of the document. </style>

Personal tools