您在這裡

Hypertext Markup Language (HTML)

19 一月, 2016 - 16:44

HTML is the universal language spoken on the Web. Any Web browser running on any hardware platform can read and interpret your documents if they’re written in HTML. It follows that writing HTML is the most basic skill you need as a Web designer.

HTML is a markup language. For example, within a document, we use the <h1> and </h1> tags to surround or contain all the level one headings, <p> and </p> to contain paragraphs, <ul> and </ul> to contain a list, <li> and </li> to mark the items within a list, and so on. These are examples of structural markup tags.

Figure 1.1 shows an example of structural markup tags and how the example displays in a Web browser.

Figure 1.1 An example of structural markup tags

HTML rendering result:

  • Chocolate
  • Vanilla
  • Strawberry
  • Cookies and Cream

On the other hand, HTML also contains markup tags that describe how the content is supposed to look rather than what part of the document it is. These types of tags are called presentation tags.

Figure 1.2 shows an example of presentation tag.

Figure 1.2 An example of presentation tag

HTML rendering result:

If I wanted this line to be displayed in italics I would use italic tags.

There is another set of tags that requires the browser to perform special functions associated with the element. These types of tags can be classified as processed and interactive markup.

Figure 1.3 shows an example of such markup.

Figure 1.3 An example of such markup
 

HTML rendering result:

Please refer to our website for more details.

Note: The website that the above hyperlink refers to is fictitious. It doesn't exist in the real world.

There’s an excellent tutorial at www.w3schools.com/html/default.asp in case you need more HTML practice. Now complete the following activity as a review of HTML.

HTML was invented by Tim Berners-Lee, who based it on Standard Generalized Markup Language (SGML). The basic idea of SGML is that the document’s structure should be separate from its presentation.

If this is the case, you may be wondering why HTML includes presentation tags and attributes.