We’ll demonstrate some fundamental HTML examples in this chapter.

HTML Basic Examples

If we utilize tags that you are not yet familiar with, don’t be
concerned.

The document type declaration
<!DOCTYPE html> must appear at
the top of every HTML document.

Beginning with <html> and ending
with </html>, an HTML document is
itself.

Between <body> and
</body> is where the HTML
document’s visible content is located.

The <!DOCTYPE> declaration,
which represents the document type, aids browsers in correctly displaying
web pages.

It needs to show up at the top of the page just once (before any HTML
tags).

There is no case distinction in the
<!DOCTYPE> declaration.


<!DOCTYPE html>



HTTP Headers

The <h1> to
<h6> tags in HTML are used to
define headings.

The most significant heading is defined by
<h1>. The smallest heading is
indicated by the tag <h6>.

Please write this HTML code into your HTML editor and learn and see the
result.

Example:

<!DOCTYPE html>
<html>
<head>
     <title>This is the title</title>
</head>
<body>
     <h1>This is heading 1</h1>
     <h2>This is heading 2</h2>
     <h3>This is heading 3</h3>
     <h4>This is heading 4</h4>
     <h5>This is heading 5</h5>
     <h6>This is heading 6</h6>
</body>

Beat Mark Project (download)




HTML Paragraphs

The <p> tag in HTML defines paragraphs.

Please write this HTML code into your HTML editor and learn and see the
result.


Example:

<!DOCTYPE html>

<html>

<head>

    <title>Page Title</title>

</head>

<body>

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

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

</body>


</html>



HTML Links

The <a> tag is used to define links in HTML.

Please write this HTML code into your HTML editor and learn and see the
result.


Example:

<!DOCTYPE html>

<html>

<head>

    <title>Page Title</title>

</head>

<body>

    <div>

        <a href=“https://www.technicalmrstar.com/”>This is a link</a>

    </div>

</body>
</html>

The <href> attribute specifies
the link’s final destination.

To give more details about HTML elements, attributes are employed.

In a subsequent chapter, you will learn more about characteristics.

HTML Pictures

The <img> tag is used to define
HTML images.

The attributes width, height, alternate text (alt), and source file (src)
are as follows:

Example:

<!DOCTYPE html>

<html>

<head>

    <title>Page Title</title>

</head>

<body>

    <div>

        <img src=“technicalmrstar.jpg” alt=“TECHNICAL MR STAR” height=“493” width=“1600”>

    </div>

</body>


</html>

All Material (download)

Rate this post

Categorized in: