HTML Getting Started example

Source: Internet
Author: User

Example HTML Getting Started example

<1> Open Notepad: Click "Start"--Select "Programs"--Select "Accessories"--select "Notepad"

<2> Enter the following code (direct copy of the past is OK)

<! DOCTYPE html>
<title> Welcome to my blog </title>

<body>
<p> first Instance of HTML
<a href= "Http://www.cnblogs.com/JSWBK" > This is my blog
</a>
</p>
</body>

<3> Click "File"--select "Save"--Select File type "All Files"--file name enter "frist.html" and select File Save address. (Remember to save the file suffix as. html or. htm, otherwise the page cannot be displayed)

<4> now we can double-click the file. Look at the effect.

Now explain the example above
    • The HTML file is a text file. The suffix name of the text file is. txt, and the HTML suffix is. html.
    • <!DOCTYPE html>Represents the document type, roughly meaning: This page is an HTML document
    • In an HTML document, the first label is . This tag tells the browser that this is the beginning of the HTML document (see HTML tag).
    • The last tag in the HTML document is that this tag tells the browser that this is the end of the HTML document.
    • The text between and tags is the header information. In the browser window, the header information is not displayed on the page (see head tag).
    • The <title> </title> text between and tags is the document title, which is displayed in the title bar of the browser window (see title tab).
    • The <body> </body> text between and tags is the body and will be displayed in the browser (see Body tab).
    • In <p> and </p> tags represent the paragraph (see P tab).
    • <a>And </a> defines a hyperlink that users can link to the http://www.dreamdu.com website (see a tag) as soon as they click on "Learn HTML".
A few questions I can only use Notepad to do the editor?

A: There are many editors available, some WYSIWYG editors, such as dreamweaver,frontpage, you can easily create a page without writing code, but it's possible to generate some junk code.

If you want to be a skilled web programmer, I strongly recommend that you write your code in a plain text editor, which will help you learn the basics of HTML. Of course you can use a more powerful text editor, such as: Notepad++editplus UltraEdit.

Monkey recommendation: When editing a webpage, you can use both Dreamweaver and Notepad++,dreamweaver's powerful features to quickly generate a lot of code, and then refine the code with notepad++ corrections.

I finished writing the HTML file, but I can't see the result in the browser after double-clicking, why?

A: Make sure you save the file and use the correct file name and extension, for example: dreamdu.html, and make sure you open the same file with your browser.

I edited the HTML file, but the results were not displayed in the browser, why?

A: The browser caches your original page, so it does not read the new page. You have modified this page, the browser does not know. Use the Refresh/Reload button to force the browser to read the edited page, or press F5 to refresh repeatedly.

How do i show the file name extension?

A: Open "My Computer"--select "Tools"--Select "Folder Options"--select "View"--Remove the "Hide extensions of known file types" tick.

HTML Getting Started example

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.