Miscellaneous HTML Tags
Tags that don't seem to fit in any other section ...
- Comment -
<!-- hello world -->
- Anything between the comment tags is not displayed by the browser, so they are used to document your html code, or sometimes for hiding sections of html that you don't want to delete just yet.
- Document Type -
<!DOCTYPE ... >
- The purpose of the
DOCTYPEdeclaration is to define the type of HTML document to web browsers, more specifically, which versions of HTML to use. The
DOCTYPEshould appear on the first line of a file, even before the
htmltag, and will typically be similar to one of the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- META Tags -
- Meta tags contain information about the page that does not need to be displayed, but it still used by search engines and other web crawlers. They are typically used to give search engines a brief description of the page, as well as the important keywords on it. Meta tags must appear within the
headsection of the html, and have usually have two of the following attributes:
name="?"- The name of the meta tag, such as
content="?"- The actual content or value of what was specified in the
nameattribute. Can also be used along with
http-equiv="?"- An alternate way of defining names for some special meta tags such as content-type and language.
- Also see the table of Page Transition Meta Tags.
- Blinking Text -
<blink> ... </blink>
- Blinking text can be usefull when making things stand out, however overuse of this tag can actually cause a web page to appear ugly. I find blinking text extremely annoying, and should probably remove it from this guide :-P
Basic use of
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="description" content="Meta Tags Example"> <meta name="keywords" content="html, meta, tags, example"> <meta name="author" content="Robert Duncan"> <meta http-equiv="Content-Language" content="en"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <!-- this page should look empty --> </body> </html>