learn HTML Basics

Part 1

HTML structure

when you create new html file, you must first declare document type:

<!DOCTYPE html>

in the next example you can see the basic HTML structure,
it will also explain about the <body> and <html> tags that comes after the <!DOCTYPE html> tag:

Code Example:

<!DOCTYPE html >

<h1>Header </h1>
<p >
Paragraph </p>

Try yourself >>

tip: If you have not learned about the tags in the example, we will talk about them in next parts of the lesson.

Part 2

HTML Headings

Heading is defined with the:
<h number >

Code Example:

<h1>Header1 </h1>
<h2>Header2 </h2>
<h3>Header3 </h3>
Try yourself >>

h1 is the most important header, and has the biggest font size, example:

here are example of the font size of h1 h2 and h3 tags

This is heading 1

This is heading 2

This is heading 3

Try yourself >>

Part 3

HTML Paragraphs

Paragraph is defined with the: <p> tag.

Code Example:

<p>hey i am Paragraph </p>
<p>me too. </p>
Try yourself >>

Part 4

HTML Images

Images are defined with the: <img> tag.

img tag has attributes such as:

source file (src), alternative text (alt) , width and height.

Code Example:

<img src="/img/howtomain.jpg" alt ="freecodewiki.com" width="111" height="132"></img>
Try yourself >>

Part 5

HTML Links

links are defined with the: <a> tag.

Code Example:

<a href="link name"> I am a link </a>
Try yourself >>

Part 6

HTML Buttons

Buttons are defined with the: <button> tag.

Code Example:

<button >Click! </button>
Try yourself >>

Part 7

HTML Lists

Lists are defined with the: <ul> tag, followed by <li> tag.

Code Example:

<li> Alex </li>
<li> Danni </li>
<li> Anton </li>
Try yourself >>

tip: You can also use <ol> tag to get rid of the dots before the text.

with FreeCodeWiki, you can learn HTML Basics and many other HTML courses, our main goal is to allow students to learn HTML and other online coding courses in one place without paying or even leaving home.