Html basics (1): Composition Structure of 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.

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.

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. First, we will introduce the composition structure of HTML:

HTML Composition

(The head, eyes, and body are like a person, right ?)

1. header. As long as you have learned English, you should know how to write your head in English! Yes, the HEAD is. Therefore, the HTML format of the header is

2. Eyes. Just like a person's eyes, it is the Window of the soul, and the eyes of a webpage should be the title of its page. What should I say about the title? Title, yes! You know that your eyes are on your head, so <title> title </title> should be placed between <Head> <title> title </title>

3. Body. The body is the most important part of the web page, because what we talked about earlier is not what the page shows, the page we see is the BODY part (of course its TITLE can be seen in the top left corner of the browser). The BODY-BODY is written in the following way: <body> page content </body>

Finally, don't forget to integrate these parts into a web page, so we can pack them with Let's take a look at the structure of the webpage:

<Html>
<Head>
<Title>
Title
</Title>
</Head>
<Body>
Page Content
</Body>
</Html>

Do you want to try it?

If you are running windows, open notepad and enter the following text:

 

Copy to ClipboardReference: [www.bkjia.com] <Head>
<Title> Title of page-bkjia.com </title>
</Head>
<Body>
This is my first homepage.
<B> This text is bold </B>
</Body>
</Html>

Save this file as invalid mypage.htm ".

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.

About the HTML editor:

With WYSIWYG editors such as frontpage and dreamwaver, you can easily create a page without writing code in plain text.

But if you want to be a skilled web 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 compiled an HTML file but cannot see the result in the browser. Why?
A: Make sure that you have saved the file and used the correct file name and extension, for example, "c: \ mypage.htm". Make sure that you use the same file name in your browser.

Q: I edited the HTML file, but the Modification result is not displayed in the browser. Why?
A: The browser caches your page, so it does not need to read the same page twice. You have modified this page, and the browser does not know. Use the "Refresh/reload" button to force the browser to read the edited page.

Related Article

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.