Beginners Guide to HTML Part 1

Written By: Kevin Jordan

- 27 Mar 2006 -
















Description: This tutorial is designed for beginners who are just starting on the path to learning web programming. We'll start by describing the parts that every HTML document has and then move all the way through tables and forms.

  1. Creating an HTML Page
  2. Paragraphs and Text
  3. Links and Images

Introduction

Sure HTML is a markup language, not a programming language, but try designing a website without it. If you're planning on programming in ASP, PHP, of JavaScript, you'll most likely need a little HTML for the client side.

This tutorial is designed for beginners who are just starting on the path to learning web programming. We'll start by describing the parts that every HTML document has and then move all the way through tables and forms.

Creating an HTML Page

In order to create a web site, all you need is a simple text editor. In fact, simple is almost a requirement. If you try creating you web site in Microsoft Word, you'll end up with a big mess. Use Notepad instead, or if you want to get really fancy use Notepad++. Notepad++ will add some syntax highlighting to your code and makes organization a little easier (especially when you start nesting tables).

The reason you can't use any fancy writing software is that HTML is very sensitive to the type of characters that you can use. Think letters, numbers, and a couple symbols only. If you start throwing in all the font and paragraph information into that mix, you'll see those control codes rather than the actual change in font.

So you got your text editor. Now what? Save the document with an .htm or .html extension at the end. Now you have a web page. A blank one, but your browser will look at the document and try to interpret an HTML (once we add some). Typically the first page displayed on a browser is called index.htm or index.html. This can be configured from the web server, but we don't really need to worry about this. Also you may be asking, ".htm or .html, which one should I use?" Either will work exactly the same I prefer .html, but back in the old days some operating systems could only handle three characters after the period, so .htm was required.

Basic Document Structure

So you've got a blank indexl now. Let's fill it in a little bit.


Every HTML page should start with . Even though we already told the browser that we're using HTML by naming it with the proper extension, this will distinguish our markup language from any other extras we decide to throw in there like a JavaScript.

Also notice at the end we have the / this is a terminator, and no, not Arnold Schwarzenegger. Everything we create with < and > is called a tag. Every time you start a tag, you've got to finish it with a terminating, or closing, tag. You'll see a lot more as we go along.


        
                </span></span>Page Title<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">
        
        
                Type what ever you want here.
        

Here's the basic structure to every HTML page. Notice how the document starts with and ends with . The rest of the page is divided into two sections the header, , and the body, .

The header is where you put information that is important about the web page, but you won't typically see in your browser window. The tag changes the text that appears on the top of your browser, but not in the actual viewing pane.</p> <p>The body is where all the meat of you site goes. Everything you put here is what you'll see on your webpage. Try changing a couple of the values for title and what's in the body, save it, and then open it in your browser.</p> <div style="width: 100%;"></div> <p class="prev"></p> <p class="next"><a href="/2006/03/beginners_guide_to_html_part1_p02.php">Next >></a></p> <div class="ad486" style="margin-left: auto; margin-right: auto;"> </div> </div> <script type="text/javascript"> //<![CDATA[ //Popup Window Script © CJ Website Design function popUp(url){ window.open(url,"pop","width=650,height=500,toolbars=0,scrollbars=1") } //]]> </script> <div id="nav"> <h2>article tools</h2> <ul> <li><a href="javascript:popUp('/emailpage.php?id=/2006/03/beginners_guide_to_html_part1_p01.php');">E-mail to a Friend</a></li> <li><a href="?version=print">Printer Friendly Version</a></li> <li><a href="javascript:popUp('/linkpage.php?id=7');">Link to this Article</a></li> </ul> <h2>related articles</h2> <ul> <li><a href="/2006/03/beginners_guide_to_html_part1_p01.php">Beginners Guide to HTML Part 1</a></li> <li><a href="/2006/03/beginners_guide_to_html_part2_p01.php">Beginners Guide to HTML Part 2</a></li> </ul> <h2>languages</h2> <ul> <li><a href="/csharp.php">C# (9)</a></li> <li><a href="/c.php">C/C++ (3)</a></li> <li><a href="/html.php">HTML/XHTML (3)</a></li> <li><a href="/java.php">Java (6)</a></li> <li><a href="/javascript.php">JavaScript (1)</a></li> <li><a href="/lua.php">Lua (1)</a></li> <li><a href="/other.php">Other (1)</a></li> <li><a href="/php.php">PHP (8)</a></li> <li><a href="/ruby.php">Ruby (2)</a></li> <li><a href="/vb.php">VB/VB.NET (3)</a></li> <li><a href="/vbscript.php">VBScript (2)</a></li> </ul> <h2>social bookmarks</h2> <ul id="bookmarks"> <li><a href="http://del.icio.us/post?v=4&noui&jump=close&url=https://scratchprojects.com%2F2006%2F03%2Fbeginners_guide_to_html_part1_p01.php&title=Beginners+Guide+to+HTML+Part+1"><img src="/images/bm-delicious.png" alt="Add to del.icio.us"> Add to del.icio.us</a></li> <li><a href="http://digg.com/submit?phase=2&url=https://scratchprojects.com%2F2006%2F03%2Fbeginners_guide_to_html_part1_p01.php&title=Beginners+Guide+to+HTML+Part+1"><img src="/images/bm-digg.png" alt="Digg it!"> Digg it!</a></li> <li><a href="http://www.dzone.com/links/add.html?url=https://scratchprojects.com%2F2006%2F03%2Fbeginners_guide_to_html_part1_p01.php&title=Beginners+Guide+to+HTML+Part+1"><img src="/images/bm-dzone.png" alt="Add to dzone"> Add to dzone</a></li> <li><a href="http://www.furl.net/storeIt.jsp?t=Beginners+Guide+to+HTML+Part+1&u=https://scratchprojects.com%2F2006%2F03%2Fbeginners_guide_to_html_part1_p01.php"><img src="/images/bm-furl.png" alt="Furl this!"> Furl this!</a></li> <li><a href="http://reddit.com/submit?url=https://scratchprojects.com%2F2006%2F03%2Fbeginners_guide_to_html_part1_p01.php&title=Beginners+Guide+to+HTML+Part+1"><img src="/images/bm-reddit.png" alt="Add to reddit"> Add to reddit</a></li> <li> </ul> <h2>search</h2> </div> <div id="header"> <h1>Scratch Projects :: Programming Tutorials From Scratch To Finish</h1> </div> <div id="tabs"> <ul> <li><a href="/" title="Home"><span>Home</span></a></li> <li><a href="/projects.php" title="Projects"><span>Projects</span></a></li> <li><a href="/tutorials.php" title="Tutorials"><span>Tutorials</span></a></li> <li><a href="/board/" title="Forum"><span>Forum</span></a></li> </ul> </div> <div id="footer"> Website Optimized and Maintained by Astute Visions | <a href="/privacy_policy.php">Privacy Policy</a> | <a href="/write_for_us.php">Write For Us</a> |  <br> <br> </div> </div> </body> </html>