HTML stands for Hypertext Markup Language. It is the text form of DNA for web content. With it you can you can govern how pages function, look, and react to viewers but do not be fooled. HTML is not just for web designers anymore. Your MySpace page, personal email, and photo sharing can all be enhanced with this simple code.
The following will teach you the very basics and the anatomy of an HTML snippet. Before we begin there are some terms you might need to know:
- Opening Tag – Tags in general are marked by opening (<) and closing (>) brackets. And opening tag refers to the first set of brackets in any one line of code. Example:
- Closing Tag – This refers to the second tag. All closing tags have a backslash (/) after the first bracket as a way to mark the end. Example:
- Element – The first word that appears in the tag is known as an element. Your element is determined by 'what' in that line of code you are working with. This will also appear in the end tag just after the backslash (/).
- Attribute – An attribute is determined by 'what' in the element you are trying to change. It follows just after the element though is not necessary in all lines of code.
- Command – These appear inside quotation marks ( "") and just after your element and attribute. It does precisely what it's name implies. It commands something about your element to change, usually your attribute unless one is not present.
In the next snippet of code I will show you how these words are applied.
The opening tag is <font> and the closing tag is </ font>
The above is a common code used to change the color of your font.
The opening tag is and the closing tag is. Your element in this case is the word font because that's what you are trying to change. Likewise your attribute is 'color' because that what you are trying to change about your element. Lastly, our command is = "red". That's the color (our attribute) that we are trying to change the font (our element) to.
- When changing font color you can often write the name of the color in for the command but sometimes you may have to use a hex number, usually a three to 6 digit code that represents a myriad of colors. These codes can easily be looked up online.
- Do not forget your end tags or to include your backslash. If you wanted just a select sentence in an article to turn red you would use the code above but if you were to forget the end tag your entire article would turn red. Some codes do not work like this and a few may not function at all without proper tags.
Using the above format there is no limit to what you can do with basic HTML codes.