HTML Advanced Application Tips (i) HTML language basics

Source: Internet
Author: User
Tags format end microsoft frontpage
Skills

  Why should I learn HTML?

Over the past two years, many companies have developed graphical HTML development tools that make Web pages very simple to make. Microsoft FrontPage, Adobe Pagemill, and Dreamweaver, a Micromedia company, have been called "WYSIWYG" web-making tools, for example. These graphical development tools work directly with Web pages without having to write laborious markup. This allows users to write Web pages without the HTML Language Foundation. At this point, the task of writing HTML documents is done for you by the development tools. This is the biggest success of web graphics editing tools, but it is also their biggest shortcoming. Constrained by the graphical editing tool itself, a large amount of garbage code is generated. The reason is very simple, I give a simple example you understand. For example: Design a form on a Web page, if the width and height of each cell make it automatically determined according to its contents, HTML as long as you tell it is the table and cell order (that is, the number of rows) on the line, but because the graphical development tool can not know your special requirements, so you can only take the general requirements, The width and height of each cell are defined to add a lot of code. So a wise Web creator should learn the HTML language further on the basis of mastering the graphics editing tools, to know that those are garbage code, so that we can use graphical HTML development tools to quickly make Web pages, but also eliminate unwanted code, so as to achieve rapid production of high-quality Web pages.

  Second, how to use HTML?

The HTML language, also known as Hypertext Markup Language, is an abbreviation of the English Hyper Text Markup language. The HTML language, as an identifier language, is made up of certain symbols and grammars, so it is easy to understand and master. It can be said that HTML language is easiest to learn in all computer programming languages. The documents that make up HTML are all Ascili files, so creating an HTML file is simple, just a normal character editor. such as Notepad, WordPad can be used in wndows. You can also use specialized HTML editing tools such as coffeehtml, Homesite, and Htmledit Pro, which are designed to automatically check syntax errors in HTML documents and assist in correcting them. With a graphical HTML development tool, making it easier for us to learn HTML, we can use it to make a good web page, and then in the HTML code Editor that comes with it, delete those useless code, take advantage of its WYSIWYG properties, so that we can quickly grasp the HTML. In particular, Micromedia company recently released Dreamweaver4, you can put the Source Editor and Web page Editor in the same window, it is very convenient.

  III. Basic HTML Concepts

1. Mark

The symbols that HTML uses to describe functionality are called "tags." such as "HTML", "Body", "TABLE" and so on. tags in use must be enclosed in square brackets "<>", and are in pairs, and no slash marks indicate the beginning of the action of the tag, and a marker with a slash indicates the end of the tag's effect. Such as <TABLE> indicates the beginning of a table,</table> the end of a table. In HTML, the size of the markup is written in the same format, such as <TABLE> and <table>, which represents the beginning of a table.

Tags can contain tags, such as tables or other tags, such as the following HTML code structure is correct:

<table width= "50%" border= "ten" cellspacing= "ten" cellpadding= "ten" >
<tr>
<td>
<table width= "100%" border= "1" cellspacing= "1" cellpadding= "1" >
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
<td>
<p> </p>
<p>hjk</p>
<p> </p>
</td>
<td> </td>
</tr>
</table>

However, tags cannot be nested, such as the following code is wrong:

<div><span> This is not the correct code </div></span>

2. Special characters

Because square brackets and double quotes are used to prompt HTML for markup and parameter values, the display of square brackets and quotation marks in a Web page can only be replaced by other symbols, following are the normal characters represented by common special characters:

< < corresponding characters <
> > Corresponding characters >
"or"--corresponding character "
à--corresponding character A

3. Grammar

A tag, in order to clarify its function, is often described by a number of attribute parameters, the provisions of these attributes are called syntax, such as: Paragraph mark <p>, its syntax format is:

<p Align=left|center|right class=type>

This means that the <p> tag has two attribute parameters, namely "Align" and "class", where "align" is used to define whether the segment is left, right, or centered. The default value is left. and "Class" is the type that the definition belongs to. In the actual application, of course, there is no "align" and "class" parameters, by default, this is very important, this is one of the main criteria for us to judge the useless code, if the code in the Web page to describe the default value of the statement code, is clearly useless code. In addition, when setting the attribute value of a tag, if the default value does not affect the effect or the effect is very small, we try to take the default value, so that you can not set, so as to reduce the purpose of the code.

The exact value of the tag parameter has a Latin quotation mark, such as: to center the paragraph, this is the correct way to:

<p align= "Center" > Paragraph Content Center example </p>

The key to learning how to use HTML well is to apply tag parameters flexibly. In particular, the application of the default value.



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.