|
EBSQ Art FAQ - HTML - HTML Tips (Concepts) What are the general concepts to working with HTML? Learning some simple HTML is easy to do. There are a few concepts that are important to understand.
HTML is generally made up of what are referred to as Tags. Typically you will use tags to turn a feature on - using a matching 'end tag' to turn the feature off again.
For example: This is my <i>italic</i> text uses one tag <i> - the 'Italics' tag. It uses <i> to turn italics on and </i> (note the slash) to turn italics off. Below is what it would look like in a web page:
This is my italic text.
The same pattern holds true for almost all HTML tags in that there will be a start tag and an end tag (using the slash).
Tags can also use what are called 'attributes'. A great example is the FONT tag. Using <FONT> and </FONT> doesn't make much sense because there is nothing saying what type of font we want. Since it would be foolish to create a new tag for each type of font / size / color, etc., we use attributes which modify the tag. A few of the attributes that are available for the FONT tag are SIZE, COLOR, FACE. Attributes are used in the form ATTRIBUTE=VALUE and are placed in the start tag (after the tag name and within the brackets).
For Example: This Line is Red, uses the font face 'Courier New' and is pretty big (size 4!)
The HTML code used to make the above example is below. Note the attributes are underlined:
<FONT face="Courier New" color="red" size=4>For Example: This Line is Red, uses the font face 'Courier New' and is pretty big (size 4!)</FONT>
Note also that some attributes use quotes ("value") while others do not. A good rule of thumb is to use quotes around an attribute value if the value textual in nature (i.e. not a number).
Some HTML tags do not use the ending tag (with the slash). In general, if a tag isn't used to modify or contain other elements (text, pictures) it will not need an end tag.
For example, the tag <hr> creates a horizontal line. It doesn't modify text (as italics does) so an end tag just wouldn't make sense. For that reason, it doesn't use one. Below is the result of <hr>:
|