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

Course Content

HTML for Beginners

HTML for Beginners

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

bookUnderstanding 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

css

index

js

index

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

css

index

js

index

copy

Adding links to other pages.

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

html

index

css

index

js

index

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

css

index

js

index

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'?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
some-alt