📄 html_intro.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Introduction to HTML</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
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-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>Introduction to HTML</h1>
<a href="default.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_elements.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />
<h2>What is an HTML File?</h2>
<ul>
<li>
HTML stands for <b>H</b>yper <b>T</b>ext <b>M</b>arkup <b>L</b>anguage</li>
<li>An HTML file is a text file containing small <b>markup
tags</b></li>
<li>The markup tags tell the Web browser <b> how to display</b> the page</li>
<li>An HTML file must have an <b> htm</b> or <b> html</b> file extension</li>
<li>An HTML file can be created using a <b>simple text editor</b></li>
</ul>
<hr />
<h2>Do You Want to Try It?</h2>
<p>If you are running Windows, start Notepad.</p>
<p>If you are on a Mac, start SimpleText.</p>
<p>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!</p>
<p>Type in the following text:</p>
<table width='100%' border="1" class="ex" cellspacing="0"><tr><td>
<pre><html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html></pre>
</td></tr></table>
<p>Save the file as "mypage.htm". </p>
<p>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.</p>
<hr />
<h2>Example Explained</h2>
<p>The first tag in your HTML document is <html>. This tag tells your browser that
this is the start of an HTML document. The last tag in your document is
</html>. This tag tells your browser that this is the end of the HTML document.</p>
<p>The text between the <head> tag and the
</head> tag is header information. Header information is
not displayed in the browser window.</p>
<p>The text between the <title> tags
is the title of your document. The title is displayed in your browser's
caption.</p>
<p>The text between the <body> tags is the text that will be displayed in your browser.</p>
<p>The text between the <b> and </b> tags will be displayed in a bold font.</p>
<hr />
<h2>HTM or HTML Extension?</h2>
<p>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.</p>
<p>With newer software we think it will be perfectly safe to use .html.</p>
<hr />
<h2>Note on HTML Editors:</h2>
<p>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.</p>
<p>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.</p>
<hr />
<h2>Frequently Asked Questions</h2>
<p><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. </p>
<p><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. </p>
<p><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.</p>
<p><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.</p>
<hr />
<a href="default.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="html_elements.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -