Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

Basic concepts of HTML

Date:2013-08-27 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

Hyper Text Markup Language (HTML) is a useful typesetting language for web page production Beijing Website Design The most basic elements. HTML is not a programming language. Mark or add tags to the document with HTML, so that the document can be published on the www. Documents prepared with HTML contain reference graphics and format tags. View these HTML documents with a Web browser.

HTML originated from the Standard General Markup Language (SGML) and was developed by Tim Berners Lee, the inventor of the Web, and Daniel W Connolly founded Yili, a markup language, in 1990. It is an application of SCML. WWW Association, as an international formal organization that formulates HTML standards, officially launched HTML version 1.0 in 1993, providing simple text format functions. In February 1995, the HTML 2.0 version was launched, adding functions such as table processing, graphics, and images.

HTML is a symbolic markup language used to represent online information. It uses explicit commands to describe the file format, and writes standardized tag commands in HTML files. Form HTM L documents. They are suffixed with. html or. htm. When the Web browser reads the HTM L document of a World Wide Web page from Wel and the server, it will re type and restore the read page according to the multiple tags in the HTML document and the size and resolution of the display used by the browser.

Learning HTML language is an important technical basis for understanding and implementing online marketing. HTML language helps people to master web page production technology, and HTML code is often involved when using search engines, e-mail and other common means of online marketing.

1 . HTML Identifier

HTML identifiers are letters or words placed in angle brackets, such as<HTML>. HTML files can support many kinds of identifiers. Learning HTM L language is actually learning these various identifiers.

Most identifiers appear in pairs, including the start identifier and the end identifier. They define the scope of influence of the identifier. Their difference is that the end identifier has an additional slash than the start identifier. For example,<B>Learning</B>will display the text "Learning" in bold without affecting words other than the start identifier and the end identifier. Some identifiers have only a single identifier, for example, line feed identifier<BR>

Many identifiers include some attributes, which control the content of the identifier in more detail. For example, the font size attribute of the font identifier specifies the size of the text, and the color attribute specifies the color of the text, such as:

< FONT SIZE = 3 COLOR= green.> The font of this line is No. 3, and the color is green/ FONT>

HTML identifiers are not case sensitive, but in order to facilitate the maintenance and striking of HTML documents, uppercase identifiers are usually used.

HTML comments are defined by the start identifier<-- And the end identifier -->. The content between these two identifiers is interpreted by the browser as a comment, so it is not displayed in the browser.

2. HTML syntax structure

A Web page corresponds to an HTML file. The basic structure of an HTML document consists of the start and end tags, the header tag, and the body tag.

(1) Document start and end tags<HTML>and</HTML>

<HTML>and</HTML>are the first and last identifiers of the HTML document. All the contents of the HTML document are in these two identifiers. These two identifiers tell the browser that the file is a Web page.

(2) Head marks<HEAD>and</HEAD>

The first tags<HEAD>and</HEAD>are located at the beginning of the Web page, but do not include the actual content of the Web page. They are used to set the title of the Web page, define the style sheet (CSS), or insert script (Script). Among them, the most commonly used identifiers are title identifiers<TITLE>and</TITLE>, which are used to define the title of the web page. The defined title is displayed in the title bar of the browser window.

(3) One mark of text<BODY>and</BODY>

The body tags<BODY>and</BODY>contain the content of the Web page, and the body contains text, pictures, links, tables, etc.

The basic structure of an HTML document is as follows:
<htm1>One One One One One One One One One One One One One One One One One One One One One One One One Document Start Identifier
<head>One One One One One One One One One One One One One One One One One One One One First Initial Identifier
<title>One by one One by one One by one One by one Title start identifier
title
</title>One One One One One One One One One One One One One Title End Identifier
</head>One by one One by one One by one One by one One by one End identifier
<body>One One One One One One One One One One One One One One One One One One Body Start Identifier
text
</body>One by one One by one One by one One by one One by one body end identifier
</html>One One One One One One One One One One One One One One One One One One One Document End Identifier

3. HTML file editing

The simplest way to create and edit an HTM L file is to write an HTM L identifier directly in the "Notepad" provided with Windows, and save it as a file format with an extension of "HTML" or "HTM". For example, write the code shown in Figure 5-13 into "Notepad" and save it as "index. html". Open it in the browser and see the effect as shown in Figure 5-14.
 HTML Identifier

 HTML file editing

When writing HTML code in Notepad, it should be noted that "<>", "" "and other symbols are English punctuation marks, so that they can be displayed correctly in the browser.

In addition, if you want to view the source code of the HTML that opens the web page file in the browser. There are two methods: one is to right click the mouse and select the View Source command; Second, choose
Select the Source command in the View menu of the browser.

4. Relative path and absolute path

HTML files can reference various external files, including HTML pages, audio, pictures, videos, etc. In order to indicate the location of the referenced file, it is necessary to indicate the location of the file through the path. There are two ways to write HTML: relative path and absolute path.

(1) Relative path

① File reference of the same directory

If the source file and the reference file are in the same directory, write the reference file name directly. Now create a source file, info.html. In info.html, reference the index.html file as a hyperlink.

Assume info The html path is: c: Inetpubwwwrootsitesblablainfo.html

Assume that the path of index. html is c: Inetpubwwwrootsitesblablaindex.html

The code of adding index. html hyperlink in info.html should be as follows:

<a href="index.html">index.html</a>

② Indicates the parent directory

2. Roll up the directory above the directory where the source file is located,..// Indicates the superior directory of the directory where the source file is located, and so on.

Assume that the info.html path is: c: Inetpubwwwrootsitesblablainfo.html

Assume that the index.html path is: c: Inetpubwwwritsites index.html

The code of adding index.html hyperlink to info.html should be as follows:

<a href=“../index.html">index.html</a>

Assume that the info.html path is: c: Inetpubwwwrootsitesblahlainfo.html

Assume that the index.html path is: c: Inetpubwwwrootindex. html

The code of adding index.html hyperlink to info.html should be as follows:

<a href='../../ index.html'>index.html</a>

Assume that the info.html path is: c: Inetpubwwwrootsitesblahlainfo.html

Assume that the index.html path is: C: Inetpubwwwrootsiteswowstoryindex.html

The html path is: c: Inetpubwwwritsites

The code of adding index.html hyperlink to info.html should be as follows:

<a href="../wowstory/index.html"> index.html< /a>

③ Indicates a subordinate directory

To reference a file in a lower level directory, write the path of the lower level directory file directly.

Assume that the info.html path is: c: Inetpubwwwrootsitesblablainfo.html

Assume that the index.html path is: c: Inetpubwwwroot sitesblablahtmlindex.html

The code of adding index.html hyperlink to info.html should be as follows:

<a href="html/index.html'> index.html< /a>

Assume that the info.html path is: c: Inetpubwwwrootsitesblablainfo.html

Assume that the index.html path is: c: Inetpubwwwrootsitesblablahtmltutorialsindex.html

The code for adding index.htm to info.html should be as follows:

<a href='htm1/tutorials/index.htm1'> index.html</a>

(2) Absolute path

HTML absolute path refers to the complete path of the file with domain name.

Suppose you have registered the domain name www.abc.cn and applied for a virtual host. The virtual host will provide a directory, such as www, which is the root directory of the website. Suppose a file index.html is placed in the www root directory. The absolute path of this file is: //www.abc.cn/index.html.

Suppose you create a directory called html_tutorials under the www root directory, and then place a file index.html in this directory. The absolute path of this file is: //www .blabla.cn/html_tutorials/index.html。
This article was published in UEO Marketing website construction Company Shangpin China //ihucc.com/


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.