Learn the Basics of HTML

Learn the Basics of HTML

In this article, we will talk about how you'll build a cat photo app to learn some of the most common HTML elements — the building blocks of any webpage.

HTML: HyperText Markup Language

HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's

Say Hello to HTML Elements

Most HTML elements have an opening tag and a closing tag.

Opening tags look like this:

<h1>

Closing tags look like this:

</h1>

The only difference between opening and closing tags is the forward slash after the opening bracket of a closing tag.

Syntax:

<h1>Hello Hashnode</h1>

Output:

Hello Hashnode

Headline with the HTML Element

  • This element tells the browser about the structure of your website.

  • h1 elements are often used for main headings,

  • while h2 elements are generally used for subheadings.

  • There are also h3, h4, h5, and h6 elements to indicate different levels of subheadings.

Syntax:

<h1>Hello Hashnode</h1>
<h2>Hello Hashnode</h2>
<h3>Hello Hashnode</h3>
<h4>Hello Hashnode</h4>
<h5>Hello Hashnode</h5>
<h6>Hello Hashnode</h6>

Output:

Screenshot (178).png

Inform with the Paragraph Element

The p element is the preferred element for paragraph text on websites. p is short for "paragraph".

You can create a paragraph element like this: Syntax:

<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat error, quam recusandae tenetur neque obcaecati!</p>

Output:

Screenshot (181).png

Fill in the Blank with Placeholder Text

comment HTML

Comments in HTML start with <!-- and end with a -->

Syntax:

<!-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugiat error, quam recusandae tenetur neque obcaecati!</p> -->

Output:

Did you find this article valuable?

Support priyanka chaudhari by becoming a sponsor. Any amount is appreciated!