How to Use HTML Codesby Melanie Rogers
HTML, or Hyper Text Markup Language, is the backbone of pages that are viewed in any web browser. The language is made up of a number of tags, or codes, which tell the browser how to display information. All codes should have an opening and a closing. Each code is surrounded by brackets like these < >. When a code is closed, a backslash is typed before the code, like this < /CODE >. You are turning the code on and off by using the brackets and backslashes. The codes included in this article are the bare minimum necessary to create a very simple web page. There are many more codes, and additional languages to learn about, but this is a very basic overview.
Understand the purpose of HMTL. The HTML code is placed at the beginning of every HTML document. This code tells the browser that the information is written in HTML. It is always the very first code in a document, and the very last code should be the closing of the HTML code.
Understand the Head code. The second code (or tag) in every document is Head. Any information about the header is included between the opening and closing Head.
Know the purpose of the Title code. Many people skip this code, but they shouldn't. The Title code puts information into the title bar at the very top of the browser window. You choose what information to put there, and it should describe the information on the page that you are creating.
Understand the Body code. The meat of your page is located between the Body tags. This is where you will place your text, links and images.
Know the purpose of Bold, Italics and Underline. There are times when you want to add emphasis to the text on your page. These three codes are commonly used to bold, italicize and underline text. If you want to bold certain words, you will use the code < B > before the words you want to bold, then < /B > to stop the bold direction. For italics, you'll use < I > and for underlining, you will use < U >.
Understand the codes for breaks. There are two ways to force a break between text on your page. The <P> code will create a new paragraph, which means you will have a blank line between blocks of text. You must open and close the paragraph for it to work correctly. The <BR> code will create a line break between two lines of text. There will be no blank line like in the paragraph. You also do not need to close the <BR> code.
Learn about the link codes. Links are found everywhere on web pages. Sometimes they connect to another page within the same site, but often they connect to another website. The code for links is <A HREF="www.newsite.com"> Text You Want To Click On </A>. Between the opening and closing tags, you'll type the text you want the user to click on in order to follow the link. Within the first brackets, you'll include the website within quotation marks, after HREF=. Keep in mind that HREF is short for hyper-reference.
Learn about the codes for images. Picture and graphics add interest to web pages. You should be sure you own the images, or that you have permission to use the images on your website. You must save the image someplace that it can be accessed at any time, so you should not store it only on your hard drive. There are free photo storage places, or you might have storage space available as part of your web hosting service. The code for inserting images is <IMG="anypicture.jpg">. You will replace the words anypicture.jpg with the name of your image.
Understand the codes for comments. There will be plenty of times when you want to remember why you wrote something, or what a certain piece of code does. The comment tag allows you to insert a piece of information into your code, and it does not display on the web page. Put any comment in between this piece of code: <!-- This is where you'll type your comment -->.
- check Save your work often.
- check You can view the source of any page on the Internet by right-clicking on the page and choosing "View Source." You can also view the source by choosing "View" from the toolbar. This is a great way to learn how pages are put together, since all the coding is available to see.