1. Writing HTML
The instructions you write in HTML are called tags. Tags are surrounded by angle brackets < >. You can write tags in upper or lower case. Many users prefer to write their tags in uppercase to make them easier to identify on the document page. If you create a page in XHTML, a stricter variation of HTML, you need to use lowercase letters for your tags.
2. Elements
Elements identify the different parts of your HTML document. For example, <BODY> and </BODY> are tags defining the body text element on a page. The browser reads any text between the two tags as part of the body element. Many elements use tag pairs, an opening and closing tag, such as < P>and < /P>, while others, such as the Image tag < IMG> do not. Closing tags must always include a slash (/).< /P>
3. Attributes and Values
Each element has unique attributes you can assign. Many attributes require that you set a value, such as a measurement or specification. For example, you can set a paragraph’s alignment on the page use the ALIGN attribute and set a value for the alignment by specifying the value as left, right or center. < P ALIGN=“center”>My paragraph text.< /P>. Values are always enclosed in quotation marks and appear within the element’s start tag. /P>
4. Entities
Any special characters you add to a page, such as a copyright symbol or a fraction, are called entities. HTML use entities to represent characters not readily available on the keyboard. All entities are preceded with an ampersand (&) and ended with a semicolon (;). For example, to add a copyright symbol to your page, the code looks like this: ©.
5. Avoid Syntax Errors
To avoid HTML erros, always take time to proofread your code. Make sure you have brackets on your tags and that your closing tags include a slash. You must surround any values you define for attributes with quotation marks. It also helps to write your closing tags in reverse order of the opening tags. For example: <P ALIGN=“center”> <B> My Text </B></P>. To help make your HTML readable, consider using new lines to enter code instead of running everything together on one long line. Using white space can also help, without increasing the file size.