THE GAME CUSTOMIZATION NETWORK: FPSB | RTSB | RPGB |
SUBSCRIBE
 
 

Introducti
Added by...




Key Authors
W3Schools
Category: FPSB > Scripting
Tags: bopper, w3schools, html, basic, introduction
Added 1 year ago - last modified 10 months ago
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.</div></td></tr> <tr class="row" valign="middle"></tr> </table> </div></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold">Feedback<a name="msgbox"></a></div><div><div class="row pad0"><div style="height:0px;clear:both;padding:0px"></div></div><table width="100%" cellpadding="1" cellspacing="1"> <form name="f_2" id="f_2" method="post" action="/tuts/6014"><tr class="row" valign="top"><td class="row_alt row_emboss" nowrap><table width="100%" cellpadding="0" cellspacing="0"><tr class="row_alt"><td width="100%">1 year ago<br><a href="http://www.fpsbanana.com/tuts/6014?qpost=3423364#addmsg" title="Quote"><img src="http://image.fpsbanana.com/ico/mquote.gif"></a> <a title="Post Profile" href="http://www.fpsbanana.com/posts/3423364"><img src="http://image.fpsbanana.com/ico/arrow_up.gif"></a> <a title="Report Post" href="http://www.fpsbanana.com/posts/report/3423364"><img src="http://image.fpsbanana.com/ico/report.gif"></a></td><td class="bold tstrong" align="right"><a href="http://www.fpsbanana.com/members/156849"><img src="http://image.fpsbanana.com/upic/156849.png"></a></td><td><table id="icostats_3423364" onmouseover="ttObj.Open(this.id);icostatsObj.DoRequest('http://www.fpsbanana.com/responders/member/icostats/156849');" onmouseout="ttObj.Close();" cellpadding="0" cellspacing="0"><tr><td style="padding:0px"><img src="http://image.fpsbanana.com/ico/av_status_off.gif"></td><td style="padding:0px"><a href="http://www.fpsbanana.com/members/156849"><img height="50" width="50" src="http://image.fpsbanana.com/av/156849.png"></a></td><td style="padding:0px 0px 0px 1px"><img class="noborder" src="http://image.fpsbanana.com/ico/icostats/pr_5.gif"><br><img class="noborder" src="http://image.fpsbanana.com/ico/icostats/ef_1.gif"><br><img class="noborder" src="http://image.fpsbanana.com/ico/icostats/age_5.gif"><br><img class="noborder" src="http://image.fpsbanana.com/ico/icostats/cl_2.gif"></td></tr></table></td></tr></table></td></tr> <tr class="row" valign="top"><td class="box noborder" style="padding:3px 0px 3px 0px" width="100%"><div class="row"><div class="quote tuser tmid">You forgot to mention a doctype above the "html" tag, and don't have an encoding type specified.</div><div class="tuser tsmall"><hr>World::destoy();</div></div></td></tr> <tr class="row" valign="top"></tr> </table> <div class="row pad0"><div style="height:0px;clear:both;padding:0px"></div></div><div class="row_dark"><div style="height:0px;clear:both;padding:0px"></div></div><input type="hidden" id="module_key" name="module_key" value="2"></form></div></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold"><img src="http://image.fpsbanana.com/ico/badd.gif"> Add Feedback<a name="addmsg"></a></div><div class=" grey tsmall">Please provide <a href="http://www.fpsbanana.com/pages/459">constructive feedback</a> and adhere to FPSB's <a href="http://www.fpsbanana.com/threads/48896">Posting Rules</a>.</div><div class=" row_dark tsmall"><b class="red"><img src="http://image.fpsbanana.com/ico/error.gif"> You cannot post yet! Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login</b></div></div></td></tr> </table> </td> <td style="padding:3px 0px 0px 3px"><div style="padding:0px;text-align:right;margin-bottom:7px"><SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> // Cache-busting and pageid values var random = Math.round(Math.random() * 100000000); if (!pageNum) var pageNum = Math.round(Math.random() * 100000000); document.write('<SCR'); document.write('IPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="http://cgm.adbureau.net/jserver/acc_random=' + random + '/SITE=FPSBANANA/AREA=PC/AAMSZ=300X250/pageid=' + pageNum + '">'); document.write('</SCR'); document.write('IPT>'); </SCRIPT></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold">Assessment</div><div class=" row_dark tsmall"><b class="red"><img src="http://image.fpsbanana.com/ico/error.gif"> No assessments made... please vote!</b><br><b class="red"><img src="http://image.fpsbanana.com/ico/error.gif"> You cannot assess yet! Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login</b></div></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold">Stamps</div><div class=" grey tsmall">This Tutorial in a nutshell...</div><div class=" row_dark tsmall"><b class="red"><img src="http://image.fpsbanana.com/ico/error.gif"> You cannot stamp yet! Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission <a href="http://www.fpsbanana.com/members/register">register</a> or login.</b></div><div><div class="row"><div><b class="red"><img src="http://image.fpsbanana.com/ico/error.gif"> No stamps recorded</b></div></div></div></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold">Added by...</div><div><div class="row"><div class="bit left"><a href="http://www.fpsbanana.com/members/184418"><img height="50" title="Bopper" width="50" src="http://temple.fpsbanana.com/av/184418.gif"></a></a></div><div class="bit left"><strong style="white-space:nowrap"><a href="http://www.fpsbanana.com/members/184418"><img title="Bopper" src="http://temple.fpsbanana.com/upic/''"></a></strong><br><b class="grey">OFFLINE</b><br><span class="tuser">I want it painted black</span></div><div style="height:0px;clear:both;padding:0px"></div><div></div><div><table width="100%" cellpadding="1" cellspacing="1"> <tr valign="top"><td align="center"><img class="thumb hp" title="He works hard, for he knows his work pays off." src="http://image.fpsbanana.com/ico/icostats/m_pr_4.png"><br><strong class="blue">Worker</strong><br>18,872 points</td><td align="center"><img height="100" src="http://image.fpsbanana.com/ico/blank.gif"><br><strong class="orange"><i class="grey">No EF</i></strong><br>0 exemplary posts</td></tr><tr valign="top"><td align="center"><img class="thumb hp" title="Like a river stone, he has been worn by the passage of time." src="http://image.fpsbanana.com/ico/icostats/m_age_5.png"><br><strong class="green">Veteran</strong><br>Joined 27 Mar 2007</td><td align="center"><img class="thumb hp" title="He is green, but his lack of combat experience will never dissuade his enthusiasm." src="http://image.fpsbanana.com/ico/icostats/m_cl_1.png"><br><strong class="red">Member</strong></td></tr></table> </div></div></div></div><div class=" box bump"><div class=" pad10 coltitle tstrong bold">Related Tutorials</div><div><div class="row"><ul style="margin:5px 5px 5px 0px"><li><a href="http://www.fpsbanana.com/members/tuts/184418">More tutorials by this submitter</a> (2)</li><li><a href="http://www.fpsbanana.com/tutcats/127">More Scripting tutorials</a> (40)</li><li><a href="http://www.fpsbanana.com/tuts/games/8">More tutorials</a> (638)</li></ul></div></div></div></td></tr></table><div class="row_dark" style="padding:3px">Theme: <select onChange="window.location='http://www.fpsbanana.com/tuts/6014?settheme=' + this.value" ><option value="fpsb">FPSB</option><option value="motley" selected>Motley</option></select> <b class="grey">|</b> <a href="http://www.fpsbanana.com/members/online"><b class="green">118</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></div> <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>