How to Use HTML Codes
- 1). 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.
- 2). 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.
- 3). 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.
- 4). 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.
- 5). 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 >.
- 6). 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.
- 7). 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.
- 8). 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.
- 9). 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 -->.
Source...