Html basics (1): Introduction to HTML

Source: Internet
Author: User
HTML is the main component of a webpage. Basically, a webpage is composed of HTML languages. To learn how to build a website, you must start with the basic linguistics of the webpage.

 

First, let's give a brief introduction to the HTML language (what we instill here is that we can actually operate on it). html is a common network language and a simple and general fully-set markup language. It allows web producers to create complex pages that combine text and images. These pages can be viewed by anyone else on the internet, regardless of the type of computer or browser they use. Amazing? It's not amazing at all, because now you see pages written in this language.

Yes, HTML is not amazing, just because you don't know it very well. Now let's get started with her veil:

 

What is an HTML file?

    • HTML indicates Hyper Text Markup Language ).
    • An HTML file is a text file containing tags.
    • How does the Browser display the page with these tags.
    • HTML files must have the HTM or HTML extension.
    • HTML files can be created using a simple text editor.
How about an experiment?

Step 1: If you are using Windows, start notepad.

If you use Mac, start simpletext.

(Use textedit in OSX and set the following parameter: In parameter settings, select plain text to replace rich text, and select "ignore Rich Text command in HTML file ". This is very important, because otherwise, htmlCodeIt may not work properly .)

Step 2: Enter the following text:

  <  Html  >  
< Head >
< Title > Page title </ Title >
</ Head >
< Body >
< P > This is my first page. < B > This is bold text. </ B > </ P >
</ Body >
</ Html >

Step 3: Save the file as "mypage.html ".

Step 4: double-click the file directly, or start the browser-> select "open" (or "open page") in the File menu "), in this case, a dialog box is displayed-> Select Browse (or select File)-> locate the HTML file you just created --w.mypage.htm ", select it, and click Open->. then, in the dialog box, you will see the address of this file, for example, "C: \ mydocuments \ mypage.htm"-> click "OK", and the browser will display this page.

 

Why should we use lower-case tags?

As we mentioned earlier, HTML tags are not case sensitive: <B> and <B> act the same way. When you surf the internet, you will find that most tutorials use uppercase HTML tags in their examples. We always use lower-case letters. Why?

If you want to prepare for using the next generation of HTML, you should use lower-case tags. The W3C standard is that lower-case tags are recommended in HTML 4, while lower-case tags must be used in XHTML (next-generation html.

 

 

Htm or HTML extension?

When you save an HTML file to a disk, you can use HTM or HTML as the extension. We just used. HTM as the extension of the above example. However, this may be a bad habit. People who are used to it may have developed this bad habit because of using outdated software that only allows three letters as extensions.

If you use recent software, we think using. html is quite safe.

 

Considerations for the HTML editor:

You can use the WYSIWYG editor instead of the plain text editor to easily edit HTML files. For example, FrontPage, Claris home page, Adobe pagemill, or even higher-order Dreamweaver.

However, if you want to become a skilled developer, we strongly recommend that you write code in a plain text editor, which helps you learn the basics of HTML.

 

FAQs)

Q: I have edited an HTML file, but the browser cannot display the result. Why?

A: First, make sure that you have used the correct file name and extension for saving the disk, for example, "C: \ mypage.htm ". Then check whether the same file name is used in the browser to open the file.

Q: I edited the HTML file again, but the Browser display has not changed. Why?

A: In order not to read the same page repeatedly, the browser must cache your page. The browser does not realize that you have modified the page. You can use the refresh or reload button to enable the browser to read the edited page.

Q: What browser should I use?

A: You can use any common browser 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 browsers.

Q: Do I have to run Windows on my computer? Can I use a Mac host?

A: You can perform all training on non-Windows systems, such as Mac.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.