HTML Basics | Basics Tutorial
-
What is an HTML file?
-
- HTML refers to the Hypertext label language.
- The hhtml file is a text file that contains some labels.
- These labels tell the Web browser how to display the page.
- The HTML file must have either HTM or HTML as the file name extension.
- HTML files can be created by a simple text editor.
How about doing an experiment?
First step: If you are using Windows, start Notepad.
If you are using a Mac, start SimpleText.
(in OS X, use TextEdit and set the parameters: Select the plain text font in the parameter settings instead of rich-text fonts, and then select "Ignore rich-text commands in HTML files.") This is important because, if not, the HTML code may not work correctly. )
Step Two: Type the following text:
Step three: Save this file as "mypage.htm".
Step Fourth: Start your browser. Choose Open or open page in the browser's File menu. A dialog box pops up. Click Browse or select file to locate the file you just created-"mypage.htm", select it and then open it, and now you will see a row of addresses in the dialog box, such as "C:\MyDocuments\mypage.htm". Click the OK button and the browser will display this page.
Example Explanation:
The first label in the HTML file is
The text located between the
The text in the <title> label is the title of the file. The title is displayed in the title bar of the browser.
The text in the <body> label is the text that will be displayed by the browser.
The text in the <b> and </b> labels is displayed in bold.
Why do we use lowercase labels?
We just talked about: HTML tags are not sensitive to case:<b> and the role of <B> is the same. When you surf the Web, you'll find that most tutorials use uppercase HTML tags in their example. And we always use lowercase. What is the reason?
If you want to prepare for the next generation of HTML, you should use lowercase tags. The standard of the World Wide Web Consortium is that it is recommended to use lowercase labels in html 4, whereas in XHTML (next-generation HTML) you must use lowercase tags.
htm or HTML extension?
When you save an HTML file, you can use the HTM or HTML as the extension. The. htm we just used as the extension of the example above. But doing so may be a bad habit, and people who are accustomed to doing so may have developed the bad habit of using some outdated software that allows only three letters to be extended.
If you use the latest software, we think that using. html is quite a safe approach.
Considerations for the HTML editor:
You can use the WYSIWYG editor instead of the plain text editor, which makes it easier to edit HTML files. For example, FrontPage, Claris home Page, or Adobe Pagemill.
However, if you want to be a skilled developer, we strongly recommend that you use a plain text editor to learn our HTML Basics tutorial.
FAQ (FAQ)
Q: I have edited an HTML file, but the browser cannot display the result. Why?
A: First make sure that you use the correct filename and extension file, such as "c:\mypage.htm". Then look at whether or not the same file name is used in the browser to open the file.
Q: I edited the HTML file, but the browser doesn't show any changes. Why?
A: In order not to read the same page repeatedly, the browser will cache your page. The browser will not realize that you have modified the page. By using the Refresh or Overload button, you can enable the browser to read the edited page.
Q: What kind of browser should I use?
A: You can use any of the general browsers for training, such as Internet Explorer, Mozilla, Netscape, or opera. However, some examples of our advanced courses require the support of the latest version of the browser.
Q: Does my computer have to run Windows? Can I use a Mac?
A: You can do all the training on a non-Windows system, such as a Mac. However, some examples in our advanced course require that the minimum version of the Windows system is Windows 98 or Windows 2000.