The Most Basic and Easy HTML Codes

For MySpace, Blogs, or Any Web Site

Elizabeth C.
As the Internet and social media become more and more predominent in everyday life, knowing basic HTML is becoming more of an imperative. I received my first dose of HTML during my first year of college in 1996, in an English literature class, believe it or not! Instead of writing papers, the teacher wanted us to build Web sites about the books we read, which would include our commentary and analysis. At the time, I thought this was completely un-necessary, but today I am extremely grateful that an English professor took the time to each us some simple HTML codes. I had a "homepage" before MySpace was ever conceived.

Tags
In HTML coding, the tags are what you type to tell the page what to display. Tags are like the instructions that the browser uses to present your work.

Tags are contanined inside the < and > characters. Please note: for the purpose of this article, I have subsituted [brackets] for the symbols you would actually use when coding. When you write HTML code, always use these symbols < and > and not [ and ]. If I were to use those symbols for this article, the resulting code would appear and not the HTML.

Adding Images
To add an image to your page, use the following code:

[img src="http://www.website.com/image.jpg"]

The image will display and there is no need to create another tag to end the command. In order to display an image, the image must be hosted on a public Internet server. If you see a photo on another Web site that you would like to add to your page, click on it with the right mouse button. Then select "properties" to see the address for the image, starting with "http". This is the address you use inside the tag. A common problem with this technique is that the Web site you are taking the image from might change or be taken down. This will result in your page displaying a small red "x" with a box around it. You've probably seen this on the Web before. A safer bet is to right mouse click on the photo, select "Save Picture As" and then save it to your computer. Then, upload it to an image hosting site, such as Photobucket. From there, you can link to the picture, knowing that it won't be taken down or changed.

Creating Line Breaks
When you write HTML text, you cannot create a link break by hitting the "Enter" key, as you would in any other word-processing application. It might appear on the screen as if you've created a line break, or a new paragraph, but it will not display this way on the Web page. In HTML, paragraphs are created by beginning the paragraph with the [br] tag and then inserting the tag when the paragraph is done. To start another paragraph, do the same thing. If you don't want to create a new paragraph, but you do want the text to be on the next line down, simply insert the
tag. No close tag is needed.

If you would like to add a horizontal line to separate areas of the page, simply insert the [hr] tag, and no close tag is needed.

Bold, Italic, and Centered Text
To bold text, use the following code:
[strong]This text is bolded[/strong] and this text is not.

It italicize text, use the following code:
[i]This text is in italics[/i] and this text is not.

To center the text on the page use the following code:
[center]The text is centered.[/center]

HTML isn't just for tech geeks anymore. Everyone can benefit from knowing a few basic codes. Just remember, when you are using these codes, don't use the brackets as I have displayed.

Published by Elizabeth C.

I am the director of marketing for a software company in the Washington D.C. area. I'm 31 years old, and I've been involved in many activities, such as running marathons and other races, and dancing for a mi...  View profile

2 Comments

Post a Comment
  • Roderick 3/23/2007

    Very useful article Elizabeth! You can use this code when teaching code tags: <HTML></HTML>

  • Andrew Berry3/21/2007

    Aw, I was gonna do this! Great minds think alike, thumbs up!

Displaying Comments

To comment, please sign in to your Yahoo! account, or sign up for a new account.