|
-- Posted by Moridin at 5:26 pm on July 24, 2006
[SIZE=7]Introduction to HTML[/SIZE] HTML stands for Hyper Text Markup Language and is the most commonly used language on the web. It consists of markup tags and tells a browser how to display text. This the basic structure of an HTML document: | Code: | Title_of_website This is the body of the document. This text is underlined. | The first tag in your HTML document is . This marks the start of the HTML Document. marks the end of it. The text within the header tags ( and ) does not appear in your browser. It is used for code that will change the look or function of the website as a whole. The text in-between the tags will be displayed at the very top left of your browser. Everything found between the tags is, as the name implies, the body of your HTML Document. This is what will show in your browser. The text located between the tags will become underlined. [SIZE=4]How do I use HTML?[/SIZE] Well, you could either use HTML on your own computer or on a testbed. If you want to use a test bed, try J Marshall HTML Test Bed. The following will show you how to try HTML on your own computer. Note that this is for Windows only. Create a new text document on your desktop. This can be done by right clicking -> New -> Text Document. Open it and paste the above HTML into it. Save it by going File -> Save As. Save the page as "something.html". Close it and open it in a browser (by double clicking on it). Now, your browser will display the page. If you are browsing a web site and suddenly wonder something along the lines of "How did they do that?", there is an easy solution at hand. Simply right-click and choose View Page Source (on firefox) or View Source (on Internet Explorer). The short cut is Ctrl + U. This will allow you to see the source code that was used to create the web site. This is a great way to learn. Although it is a bad habit to try and memorize HTML tags, there are still a few you need to learn. [SIZE=4]Bold[/SIZE] Sometimes you might want to make text more visible because you need them to be more important in the context etc. Then you should make them in bold. To make text in bold, simply but bold tags around it like this: This text is bold [SIZE=4]Italic[/SIZE] Another powerful way of making text stand out as an important word is by making it italic. To make text italic, just put italic tags around it like this: This text is italic [SIZE=4]Underlined[/SIZE] As you have seen in the example above, to make something underlined: This text is underlined [SIZE=4]Headings[/SIZE] Perhaps the most important thing in a document is headings. This separates sections from each other and makes it easy to find what you are looking for. Headings are defined with the to tags. The higher the number the smaller the heading. This is a heading This is a heading This is a heading This is a heading This is a heading This is a heading [SIZE=4]Paragraphs[/SIZE] To space out the different sections of a website, paragraphs are often used. This allows the user to easily read text and find what he or she is looking for. To make a paragraph, do this: This is a paragraph [SIZE=4]Line Breaker and Horizontal Rule[/SIZE] A line breaker and a horizontal rule is both used to separate sections from one and another. They both use one tag only, but in the future, single tags must be closed as well, so that is what will be shown here. A line breaker is used if you want to end a line, but not end a paragraph. Using the line breaker tag, the current line will break and another will begin. The line breaker tag looks like this (notice the space before the slash): A horizontal rule on the other hand, will insert a line in your page. This can be a useful tool to separate sections.The tag looks like this (notice the space before the slash): [SIZE=4]Images[/SIZE] If you want to display an image, you should use this HTML code: URL_to_image can be http://img364.imageshack.us/img364/893/b4nn3rhdgf6.jpg and so on. [SIZE=4]Alignment[/SIZE] Although you are required to use CSS if you want to use images in the newest "version" of HTML (XHTML 1.0 Strickt) you can use the following for any other "version" of HTML. Left: Item_that_you_want_to_be_aligned_to_the_left_here Center: Item_that_you_want_to_be_aligned_to_the_left_here Right: Item_that_you_want_to_be_aligned_to_the_left_here [SIZE=4]Links[/SIZE] The HTML for the most basic hyperlinks looks this: Link Description Where URL is the URL (or "address") to the website you want to link to and "Link Description" is the text that you want to be displayed. Let's say that you would want to create link to Google with the description "Search with Google!", your code would look like this: http://www.google.com">Search with Google! Which would give the following result: Search with Google! [SIZE=4]Font size[/SIZE] There is no valid (X)HTML for font size, so we need to use (inline) CSS: Text_that_you_want_in_another_size_here The above will make the text 150% bigger than it normally would be. The number can be just about any percentage. [SIZE=4]Font color[/SIZE] There is no valid (X)HTML for font size, so we need to use (inline) CSS: text_in_red_here Change red to the color you want to have. [SIZE=4]Background color[/SIZE] The easiest way to add a background color is simply to add bgcolor="color" to your body tag like this: The above will give your website a red background color. -or- However, there is no valid (X)HTML for background color either, so we need to use CSS again! | Code: | Title_of_website Content of your website here | The above code will make the background color of your website red. Just change red to the color that you want your background color to be and it will. [SIZE=4]Background image[/SIZE] The easiest way to add a background image is simply to add background="URL_to_image_here"> to your body tag like this: | Code: | | http://www.w3schools.com/html/background.jpg"> | The above will give your website a the background image that can be found by clicking this link http://www.w3schools.com/html/background.jpg. -or- However, there is no valid (X)HTML for background image either, so we need to use CSS again! | Code: | Title_of_website Content of your website here | where URL_to_image is the URL (or "address") to your image. [SIZE=4]Some final advice[/SIZE] - Always close tags! Sometimes you can just use the start tag of an element and it will work just fine. This is a very bad habit as it can lower the functionality of your website. In a not-so-distant future, open tags will not be allowed at all. People laugh at other people not using valid HTML.
- Use lowercase HTML and not UPPERCASE.
- Use Correct Nesting! If you want to make a text both underlined and bold, make sure that they come in the right order. text is correct while text is not.
- NEVER use the HTML to display your email, becuase bots crawl websites collecting them and adding them to mailing lists for spam and/or virus and so on. Use and image or something [at] nothing [dot] com.
Moridin of LiveWire and Realm of Science. All rights reserved. No part of this text may be reproduced without the direct written consent of its author. (Edited by Moridin at 3:32 pm on July 25, 2006) (Edited by Moridin at 11:48 pm on July 25, 2006)
-- Posted by Imperium at 12:18 pm on July 31, 2006
http://www.golivewire.com/forums/topic.cgi?topic=322409&support=HTML&z=Tutorial
-- Posted by Moridin at 12:46 pm on Aug. 1, 2006
Quote: from Imperium at 10:18 pm on July 31, 2006
http://www.golivewire.com/forums/topic.cgi?topic=322409&support=HTML&z=Tutorial
This might make the situation clearer for some people.
-- Posted by dbzfreak at 1:20 pm on Aug. 12, 2006
very helpful
-- Posted by Dexus at 9:19 pm on Sep. 9, 2006
Very nice indeed.
-- Posted by Irin at 4:02 am on Aug. 21, 2007
Can anyone help me with meta tags ??????? Irin http://delnaz.livejournal.com/
-- Posted by Link01 at 9:31 am on Sep. 12, 2007
i want to get music in it how?
-- Posted by rand0mguy at 11:28 pm on Jan. 7, 2008
arnt some of those elements deprecated in favour of css styles
-- Posted by Matthew14 at 4:48 pm on Mar. 9, 2008
Very nice.
-- Posted by rand0mguy at 8:13 pm on April 29, 2008
hmmm so are you meaning html or xhtml cuz theres a bit of both like is xhtml. and you are using a mixture of valid css styles and old deprecated html style like jamesshadowwolf at 10:31 pm on Dec. 1, 2008
Copy and Paste into an HTML on your Personal Webpage Please! | Code: | http://www.support4teens.lefora.com/forum/" target="_blank"> http://img111.imageshack.us/img111/6161/mybanner4934cce7441c9um4.png" alt='Create your own banner at mybannermaker.com!' border=0 /> Copy this code to your website to display this banner!
|
-- Posted by jamieevans11 at 11:31 pm on Jan. 20, 2009
Quote: from Irin at 4:02 am on Aug. 21, 2007
Can anyone help me with meta tags ??????? 
Site name - Page title - Keyword description
-- Posted by Jasna88 at 10:56 am on Nov. 10, 2009
I started learning html like 2 weeks ago..........my bf has more then 10 years of experience in that.....i have long way to go i guess
|