Change Font Size:

HTML basic concept

What is the HTML document?

  • HTML English name is Hypertext Marked Language, Chinese called "HTML."
  • And the general text of the difference is that not only contains an HTML text of the document, also includes some Tag, Chinese "markings."
  • An HTML file suffixes were yes. Htm or yes. Html.
  • With a text editor can be prepared by the HTML document.

This test write an HTML document!

Open your Notepad, a new document, and then copy the following code to this new document, and then deposit into first.html this document.

 <html> 
 <head> 
  <title> Title of page </ title> 
  </ Head> 
 <body> 
  This is my first homepage. <b> This text is bold </ b> 
  </ Body> 
  </ Html> 

First.html to view this document, double-click it. Or open the browser, in the File menu and choose Open, then select the file is held.

Examples explained

This document is the first Tag <html>, the Tag browser tell you this is the first HTML document. The final document is a Tag </ html> that HTML file is now ended.

In "head> and </ head> between content, the Head of information. Head information is not displayed, in the browser, you see. But this does not mean that the information useless. For example, you can add some Head information, keywords, search engines can help you search the Web.

In "title> and </ title> between the contents of this is the title of the document. You can in the top of the browser title bar to see this heading.

In "body> and </ body> between the information is text.

In "b> and </ b> between the text, use bold. <b> The name implies, the meaning is bold.

HTML document looks similar and the general text, but it more than the normal text Tag, for example <html>, <b>, through these Tag, can tell the browser how to display the document.

HTML elements (HTML Elements)

  • HTML elements (HTML Element) used to mark text, the contents of that text. For example, body, p, title is the HTML element.
  • HTML elements with Tag, Tag to <start to> end.
  • Tag is usually pairs, such as <body> </ body>. Starting called Opening Tag, called at the end of the Closing Tag.
  • Currently the HTML Tag Case insensitive. For example, <HTML html> and <> is the same.

HTML elements (HTML Elements) attributes

HTML elements can have attributes. Attributes can be extended HTML element capacity.

For example, you can use a bgcolor attribute, the background color pages make a red, like this:

  <body Bgcolor="red" /> 

For instance, you can use this property border will be a table set as a borderless form. As follows:

  <table Border="0" /> 

Attributes usually attribute name and value pairs, like this: name = "value." Bgcolor in the above example, the border is the name, red and 0 is the value. Attribute values using double quotes marked up.

Property is usually attached to the Opening Tag HTML, rather than Closing Tag.