Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Understanding the Most Common Elements | Understanding Basic Elements
HTML for Beginners
course content

Contenu du cours

HTML for Beginners

HTML for Beginners

1. Understanding Basic Elements
2. Working with Semantic Elements, Multimedia Elements and Graphics
3. Working with Advanced Elements

book
Understanding the Most Common Elements

Headings

In the previous chapter, we used <h1> headings. However, there are 6 types of headings in HTML. Those are <h1>, <h2>, <h3>, <h4>, <h5>, <h6>.

Scroll down to see the full output.

html

index.html

copy

As you can see, the size of headings gets smaller as it goes from the <h1> to <h6> tag. You can bold text with <strong> tags or CSS, which you will learn later.

Paragraphs

You can create paragraphs with <p> tags. Write as many paragraphs as you want in one HTML page.

html

index.html

copy

Adding links to other pages.

We can add a link using anchor <a> tags.

html

index.html

copy

We used href inside the <a> tag, and we have assigned the URL of the Wikipedia site to it. So the href is an attribute of the <a> tag to add links.

Other common tags

There are a lot of common tags used in HTML. You will learn about them in upcoming chapters. For now, we will learn what they are.

  • Formatting tags: <strong>,<i>, <em>, <sub>, <sup>;

  • List tags: <ul>, <ol>,<li>, <dl>;

  • Form-related tags: <form>,<input>, <button>;

  • Table-related tags: <table>, <th>, <tr>, <td>.

Comments

Comments help record what is happening in the code. This can be useful when you look at your code after some time. Also, it's helpful for another developer to know what happens with each code block when he inspects your code.

html

index.html

copy
How to write HTML code to send the user to facebook.com when the user clicks the word 'Facebook'?

How to write HTML code to send the user to facebook.com when the user clicks the word 'Facebook'?

Sélectionnez la réponse correcte

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 2
We're sorry to hear that something went wrong. What happened?
some-alt