Lets learn some basic building blocks of HTML

Why do we start learning a programming language with “Hello World!

We start learning a programming language with “hello world” because if we directly write “hello world” in a vs code editor after creating an HTML doc. The web browser can’t figure out by itself that the written “hello world” text is a paragraph, heading or any type of link.

So that's why we need a markup language that can be different or figure out the behavior of web page content.

To differentiate or understand the behavior of a web page we start learning a programming language with “hello world”.

How is the use of comments and how do you write comments in HTML

Comments in an HTML doc are nothing but a short description of HTML code. We write a comment because if a new developer enrolls in any project and an old developer writes a comment above its code.

It becomes easy to understand for new developers. Writing comments before coding is considered good practice.

How do we write comments in HTML docs?

E.g

<!--- This is Heading –>

<h1>HEY I AM HEADING</h1>

What are the elements, tags and attributes and what are the differences between them?

ELEMENT OF HTML

Elements are the individual parts of the web page such as paragraphs, links, images, headings etc. each element is represented by its HTML tag. E.g for the Image we use <image src=”” alt=”” />

And for links, we use an anchor tag <a href=”” >--</a>

TAGS OF HTML

Tags are used as a building block of a webpage and they are used to define the structure and layout of a webpage. For e.g <p> tag use paragraph, <h1> tage use for heading.

ATTRIBUTES

Attributes are used to add extra functionality to any HTML element. they are always added to the opening of the elements with a key and value pair. For e.g <p style=” color: red”>I am Paragraph with color attribute </p>.

DIFFERENCE BETWEEN THEM

An element of HTML is the content of a web page. On the other hand, tags are the building blocks of the webpage. Whereas attributes are additional functionality of an HTML element.

HTML ENTITY

An HTML entity is a piece of text that begins with an ampersand (&) and ends with a semicolon (;). Entities are used to display reserved characters and invisible characters. we can also use them in place of other characters that are difficult to type with a standard keyboard.

E.g :&amp; &lt; &gt; &quot;