Search
Username:
Password:

Register or Reset Password

SUBMISSIONS
GENERATORS
INSTALL HELP
DEVHUB
FOR MAPPERS
HELP WANTED
CLANS
SPONSORS
Introduction to HTML
Difficulty: Beginner
Category: FPSB > ScriptingAuthor(s): W3Schools
Did you create this? Request ownership

Do You Want to Try It?

If you are running Windows, start Notepad.

If you are on a Mac, start SimpleText.

In OSX start TextEdit and change the following preferences: Open the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". Your HTML code will probably not work if you do not change the preferences above!

Type in the following text:


<html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>



Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.



Example Explained

The first tag in your HTML document is . This tag tells your browser that this is the start of an HTML document. The last tag in your document is . This tag tells your browser that this is the end of the HTML document.

The text between the tag and the tag is header information. Header information is not displayed in the browser window.

The text between the tags is the title of your document. The title is displayed in your browser's caption.<br /> <br /> The text between the <body> tags is the text that will be displayed in your browser.<br /> <br /> The text between the <b> and </b> tags will be displayed in a bold font.<br /> <br /> <hr /><br /> <b class=red>HTM or HTML Extension?</b><br /> <br /> When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.<br /> <br /> With newer software we think it will be perfectly safe to use .html.<br /> <br /> <br /> <hr /><br /> <b class=red>Note on HTML Editors:</b><br /> <br /> You can easily edit HTML files using a WYSIWYG (what you see is what you get) editor like FrontPage or Dreamweaver, instead of writing your markup tags in a plain text file.<br /> <br /> However, if you want to be a skillful Web developer, we strongly recommend that you use a plain text editor to learn your primer HTML.<br /> <br /> <hr /><br /> <b class=red>Frequently Asked Questions</b><br /> <br /> <b>Q: After I have edited an HTML file, I cannot view the result in my browser. Why?<br /> A:</b> Make sure that you have saved the file with a proper name and extension like "c:\mypage.htm". Also make sure that you use the same name when you open the file in your browser.<br /> <br /> <b>Q: I have edited an HTML file, but the changes don't show in the browser. Why?<br /> A:</b> A browser caches pages so it doesn't have to read the same page twice. When you have modified a page, the browser doesn't know that. Use the browser's refresh/reload button to force the browser to reload the page.<br /> <br /> <b>Q: What browser should I use?<br /> A:</b> You can do all the training with all of the well-known browsers, like Internet Explorer, Firefox, Netscape, or Opera. However, some of the examples in our advanced classes require the latest versions of the browsers.<br /> <br /> <b>Q: Does my computer have to run Windows? What about a Mac?<br /> A:</b> You can do all your training on a non-Windows computer like a Mac.<br /> <br /> <hr /><br /> For more great information just like this on HTML, please visit the <a href="http://www.w3schools.com/HTML/">W3Schools</a> website.</td></tr> <tr class="" valign="middle"><td valign="top" class="row_alt" nowrap><b>Added:</b> 2 months ago</td><td class="row_alt" valign="top" width="0"><b>Tags:</b> <a href="http://www.fpsbanana.com/tuts/search?s[tuts.tags]=bopper">bopper</a>, <a href="http://www.fpsbanana.com/tuts/search?s[tuts.tags]=w3schools">w3schools</a>, <a href="http://www.fpsbanana.com/tuts/search?s[tuts.tags]=html">html</a>, <a href="http://www.fpsbanana.com/tuts/search?s[tuts.tags]=basic">basic</a>, <a href="http://www.fpsbanana.com/tuts/search?s[tuts.tags]=introduction">introduction</a></td></tr> <tr class="" valign="middle"></tr> </table> <div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Feedback (1)<a name="msgbox"></a><div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box bump box_body"><div id="messages_boxresp" style="display:none" class="row_dark"></div> <table width="100%" cellpadding="1" cellspacing="1"> <form name="f_2" action="/tuts/6014" method="post"><tr class="row" valign="middle"><td class="coltitle" align="right" rowspan="2" nowrap><a title="Swamp56 | Member | Offline" href="http://www.fpsbanana.com/members/156849"><img height="50" width="50" src="http://image.hazardstrip.com/av/156849.png"></a></td><td class="coltitle" width="100%"><a name="pid_3423364"></a><a title="Swamp56 | Member | Offline" href="http://www.fpsbanana.com/members/156849">Swamp56 <b class="grey">.</b></a> <a title="Forgotten Inc." href="http://www.fpsbanana.com/studios/2002"><img src="http://image.hazardstrip.com/flags/studios/forgottenflag.png"></a> <br>ˇViva la revolución!<a href="http://www.fpsbanana.com/members/youtome/156849">Y2M</a></td></tr> <tr class="row" valign="middle"><td class="row_dark grey" nowrap>Posted 2 months ago <a href="http://www.fpsbanana.com/tuts/6014?qpost=3423364#addmsg" title="Quote"><img src="http://image.hazardstrip.com/ico/mquote.gif"></a> <a title="Post Profile" href="http://www.fpsbanana.com/posts/3423364"><img src="http://image.hazardstrip.com/ico/arrow_up.gif"></a></td></tr> <tr class="row" valign="middle"><td class="quote" colspan="3" width="100%">You forgot to mention a doctype above the "html" tag, and don't have an encoding type specified.</td></tr> <tr class="row" valign="middle"><td class="row_dark grey" colspan="2" nowrap>- ˇViva la revolución!</td></tr> </table> <input type="hidden" id="module_key" name="module_key" value="2"></form><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold blue"><img src="http://image.hazardstrip.com/ico/badd.gif"> Add Feedback<a name="addmsg"></a><div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box bump box_body"><div id="_boxresp" class="row_dark">Provide constructive feedback. <a href="http://www.fpsbanana.com/pages/459">What is "constructive"?</a><br><div class="bit left"><img style="width:25px;border:2px solid #333333;padding:5px" src="http://image.hazardstrip.com/ico/subs/posts.png"></div><div style="margin-left:50px"><b class="red">You cannot post yet!</b><br>Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop.<br><br>To post in this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login.</div><div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div></td><td> <img src="http://image.hazardstrip.com/ico/blank.gif" width="230" height="0"><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Assessment<div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body box_title"><div id="_boxresp" class="row_dark">The community's verdict.<br><b class="red"><img src="http://image.hazardstrip.com/ico/error.gif"> No assessments made... please vote!</b></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body bump"><div id="csa_boxresp" class="row_dark"><div class="bit left"><img style="width:25px;border:2px solid #333333;padding:5px" src="http://image.hazardstrip.com/ico/subs/csa.png"></div><div style="margin-left:50px"><b class="red">You cannot assess yet!</b><br>Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure.<br><br>To vote on this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login.</div><div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Stamps<div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body box_title"><div id="_boxresp" class="row_dark">This Tutorial in a nutshell...</div><div class="row"><div><b class="red"><img src="http://image.hazardstrip.com/ico/error.gif"> No stamps recorded</b></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body bump"><div id="_boxresp" class="row_dark"><div class="bit left"><img style="width:25px;border:2px solid #333333;padding:5px" src="http://image.hazardstrip.com/ico/cc/star.png"></div><div style="margin-left:50px"><b class="red">You cannot stamp yet!</b><br>Stamps let you apply characteristics to submissions to help others understand them.<br><br>To stamp this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login.</div><div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box bump"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="row" style="white-space:nowrap"><a title="View fullsize image" target="_blank" href="http://www.fpsbanana.com/tuts/screens/6014?img=http://image.fpsbanana.com/ss/tuts/4487.png"><img class="thumb" src="http://image.fpsbanana.com/ss/tuts/thm_4487.png"></a><br></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Brought to you by...<div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body bump"><div id="_boxresp" style="display:none" class="row_dark"></div><table width="100%" cellpadding="1" cellspacing="1"> <td class="row" nowrap><a href="http://www.fpsbanana.com/studios/5082"><img src="http://image.hazardstrip.com/banners/studios/ghs_banner.png"></a></td></tr> <tr class="" valign="middle"><td class="row_alt" nowrap><a href="http://www.fpsbanana.com/studios/5082"><strong>GAMING HELP STUDIO</strong></a><br><i>Working to make gaming a better place</i></td></tr> <tr class="" valign="middle"><td class="row" width="100%" colspan="2"><b>Membership:</b> <b class="green">Open House</b></td></tr> <tr class="" valign="middle"><td class="row_alt" width="100%" colspan="2"><b>Primary Skills:</b> 3D Animation, 3D Art & Rendering, Coding/Scripting, Compiling, Concept Art, Graphic Design, Mapping, Modelling, Motion Graphics, Project Management, Sound Effects & Music, Texturing, Web Development</td></tr> <tr class="" valign="middle"><td class="row" nowrap><b>Inception:</b> 2 months ago</td></tr> </table> <div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Vote for Studio<div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_body bump"><div id="_boxresp" class="row_dark">Like this tut? Vote <a href="http://www.fpsbanana.com/studios/5082">GAMING HELP STUDIO</a> for one or more <a href="http://www.fpsbanana.com/awards">monthly awards</a>.<br><b class="red"><img src="http://image.hazardstrip.com/ico/error.gif"> You must login or register to access this!</b></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box box_title"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="coltitle tstrong bold">Related Tutorials<div style="height:0px;clear:both;padding:0px"></div></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box bump box_body"><div id="_boxresp" class="row_dark">Want more? Find related tuts.</div><div class="row"><ul><li><a href="http://www.fpsbanana.com/studios/tuts/5082">More tutorials by this studio</a> (4)</li><li><a href="http://www.fpsbanana.com/tutcats/127">More Scripting tutorials</a> (30)</li><li><a href="http://www.fpsbanana.com/tuts/games/8">More FPSB tutorials</a> (529)</li></ul></div><div style="height:0px;clear:both;padding:0px"></div></div><div class="box"><div id="_boxresp" style="display:none" class="row_dark"></div><div class="toggle"><div class="row_alt row_emboss"> <div style="height:0px;clear:both;padding:0px"></div></div></div><div class="toggle"><div class="row_alt row_emboss"> <div style="height:0px;clear:both;padding:0px"></div></div></div><div class="toggle"><div class="row_alt row_emboss"> <div style="height:0px;clear:both;padding:0px"></div></div></div><div class="toggle tstrong bold"><div class="row_alt row_emboss"> <div style="height:0px;clear:both;padding:0px"></div></div></div><div style="height:0px;clear:both;padding:0px"></div></div></td></tr> </table> </td></tr> <tr><td height="10" colspan="2" style="padding:0px" class="box noborder bot_links"><div class="row_dark">Theme: <select id="" onChange="window.location='http://www.fpsbanana.com/tuts/6014?settheme=' + this.value" ><option value="fpsb">FPSB<option value="motley" selected>Motley</select> <b class="grey">|</b> <a href="http://www.fpsbanana.com/members/online"><b class="green">176</b> Members Online</a> <b class="grey">|</b> <a href="http://www.fpsbanana.com/mirrors">File Mirrors</a> <b class="grey">|</b> <a href="http://www.fpsbanana.com/pages/334">Terms of Service</a> <b class="grey">|</b> <b><a class="red" href="http://www.fpsbanana.com/pagecats/51">Rules</a></b> <b class="grey">|</b> <a href="http://www.fpsbanana.com/pages/192">Advertise here</a> <b class="grey">|</b> <a href="http://www.fpsbanana.com/pages/16">Contact</a> <b class="grey">|</b> <a href="http://www.fpsbanana.com/admin/reports/add">Report a problem</a></div></td></tr></table> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-4893849-1"); pageTracker._initData(); pageTracker._trackPageview(); </script> </body> </html>