Saturday, April 4, 2015

HTML: Basic Formatting Tags

HTML (or HyperText Markup Language) is the language used to build most websites. Here, I will teach you how to use some of the most basic tags of HTML to spice up webpages.

Tags are the building blocks of HTML. They are written in this format: <[tag]> (e.g. <img>). Most tags have an opening and closing tag, and the content is written in between the tags. The closing tags are the same as the opening tags, except with a slash first. (e.g. <body> [insert content here] </body>)

Here are some of the most basic HTML tags. You can use some of these tags in comments on websites, emails, etc. Look around to see if your website has a list of supported HTML tags. Some of these tags can be used to produce the same results. If one of the tags doesn't work on a specific website, try the other one.

The <strong> tag, which stands for strong.

<strong> This is an example of bold text. </strong> = This is an example of bold text.

The <em> tag, which stands for emphasis.

<em> This is an example of emphasized text. </em> = This is an example of emphasized text.

The <u> tag, which stands for underline.

<u> This is an example of underlined text. </u> =  This is an example of underlined text.

The <s> tag, which stands for strikethrough.

<s> This is an example of strike-through text. </s> = This is an example of strike-through text.

There are, of course, many more HTML tags than this, but since I'm only writing about the most basic formatting tags right now, I won't go into those right now.

When you actually write webpages, you will want to use CSS if you plan to add a format to the entire document (bold text, for example). Using the <em> or <strong> tags to do that would be an abuse of the HTML tags.

Still, if you wanted to highlight just one passage, using the HTML formatting tags would be the way to go. These tags also work on some websites where CSS styling isn't supported, but HTML is, deviantART, for example.

No comments: