HTML Basic Tutorial

A beginner's guide to HTML, a short introduction to understanding some basics of HTML.

Have you ever tried to create a HTML page with any WYSIWYG (What You See Is What You Get) editor, and got a result that was different than what you had envisioned? Although WYSIWYG editors are supposed to make the job of creating a HTML page easier, sometimes there are just some things that require the actual tweaking of the HTML code: maybe you have a HTML page than just requires some alignment tweaking or you want to change the color of a row in a table, but you are unable to do so as the WYSIWYG editor does not have the function nor ability to accomplish the task. When you attempt to see the HTML code, you are bombarded by what looks like gibberish and you do not know where to start. In a sense, the abilities of WYSIWYG editors are limited and restrained. So it is beneficial to have some knowledge of HTML, and here is a guide on understanding the basics of HTML.

Source

What is HTML?

HTML stands for Hyper Text Markup Language and a HTML page (file) can be created using a simple text editor or WYSIWYG editors. A HTML page (file) is a text file that contains small markup tags which tell your web browser how to display the page. The file extension of a HTML page can either be ".html" or ".htm".

Understanding HTML Basics (Basic Tags)

All HTML code starts with "". The start of any HTML code begins with an open tag "< >" and end with a close tag "". It is crucial that you close "" any tag after opening it, else your HTML page might not display properly. Below are some of the most commonly used words within the stated tags and their meanings:


  • html: usually found at the beginning of any HTML page
  • head: usually contains the title and body tag
  • title: enter information within this tag to give your HTML page a name, that is displayed on the top left had corner of your internet browser
  • body: defines the document's body; this is where all your content goes - sentences, tables, images etc...
  • h1-h6: are the size of headings, with 6 being the largest
  • table: creates a table
  • tr: row within a table
  • td: column within a table
  • p: paragraphs are defined with this tag - works the same way that "enter" does in Microsoft Word
  • font: sets the size and type of the font you want displayed on your HTML page
  • br: goes to the next line after the sentence or image, does not leave a spacing like the paragraph tag
  • b: bolds the text
  • a href: used to hyperlink a word/sentence or image to another page on the internet
  • li: bullets your sentences
  • ul: used before a li tag. It indents the bulleted sentences
  • img src: used to display images - what it does is reference to the place where that image is stored, and displays the image

A Sample HTML Page

In this example, the "" tags will be replaced with "{" and "}". Please remember that although the text here is not indented. It is recommended that if you ever attempt typing out HTML code to indent them, for easier viewing.

{html}

{head}

{title} This is my page {/title}

{/head}

{body}

{p}Whatever sentence or paragraph you want, enter it here{/p}

{p}

{b} Whatever sentence or paragraph you want, enter it here{/b} //to bold it if you want

{/p}

{a href="http://www.websitename.com" target="_blank"} name of link {/a} //target is where you want the link to open to - _blank (new window)

{br} // goes to the next line

{a href="http://www.websitename.com"} name of link {/a} //opens the link within the same page by default

{br} // goes to the next line

{img src="locationofimage" /} //just copy the url or address of where the image is stored in the " "

{ul} //for indented bullets

{li} text {/li}

{/ul}

{li}text{/li} //normal bullet

{table} //a table with 1 row and 2 columns

{tr}

{td} text {/td}

{td} text {/td}

{/tr}

{/table}

{/body}

{/html}

To view the above file, simple copy the code, change the "{ }" to "< >", remove the comments from "//" onwards, paste in all into a text file and save it as "nameofile.html" or ".htm", and open it as you would a normal file (your internet browser should be the one displaying the page). And there you have it, a beginner's guide in understanding the basics of HTML. For a comprehensive guide on HTML and all the possibilities do visit http://www.w3schools.com

Now you know the basics of creating a simple HTML page using a word editor, or simply modifying some parts of your HTML in your WYSIWYG editor. There is still so much more to learn, so have fun as you explore and discover the wondrous world of HTML!

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working