When a web browser downloads a document, it scans the file for snippets of text called tags. These tags tell the browser how to display the file to the person.
Tags have four main components to them:
An example of a tag could look similar to:
<openingtag attribute="value">Content</closingtag>
Now, not all tags require all of these four components, in fact some tags do not even have closing tags. For most tags though, the above example is how most tags operate.
There are tags for creating paragraphs, lists, tables, etc... There are tons of tags for you to mark up your documents and create the structure you are striving for.
There are a few tags that do not have typical closing tags associated with them. The reason for this is because they do not hold any text. One example of this is the break tag (<br>). It's purpose is to create a line break. Line breaks don't contain any text within them so there is no need to create <br></br>. All you need to do is properly close out the opening tag. You do this by adding a slash within the opening tag. To use the break tag correctly (and is XHTML compliant), you would type: <br />. This properly opens and closes tags that don't contain text.
Since the web is moving towards using XHTML (a stricter version of HTML), you should try and follow these guidelines as much as possible, so your documents adhere to the XHTML standard.
Comments
Post new comment