Basic HTML tags - four examples

This chapter demonstrates the most commonly used HTML tags through examples.

Tip:Don't worry about the examples you haven't learned in this chapter, you will learn them in the following chapters.

Tip:The best way to learn HTML is to learn by doing experiments. We have prepared a good HTML editor for you. With this editor, you can edit a piece of HTML source code at will, and then click the TIY button to view the results.

HTML titler

HTML headings (Headings) are defined by the <h1> - <h6> tags.

Example

<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>

Try it yourself

HTML afsnit

HTML paragraphs are defined by the <p> tag.

Example

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

Try it yourself

HTML links

HTML links are defined by the <a> tag.

Example

<a href="http://www.codew3c.com">This is a link</a>

Try it yourself

Note:Specify the link address in the href attribute.

(You will learn more about attributes in the later chapters of this tutorial).

HTML billeder

HTML images are defined by the <img> tag.

Example

<img src="codew3c.jpg" width="104" height="142" />

Try it yourself

Note:The name and size of the image are provided in the form of attributes.