Course Content
HTML for Beginners
HTML for Beginners
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.
index
index
index
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.
index
index
index
Adding links to other pages.
We can add a link using anchor <a>
tags.
index
index
index
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.
index
index
index
Thanks for your feedback!