All About HTML Basics Beginner (Chapter -1 )

Bajrang Bhushan
2 min readJun 10, 2023

--

In this article, we will cover some most important topics of HTML.

1 . What are Elements?
Ans: The HTML element is something from start to end.
eg: <h1>”Hello World’’</h1> . This is an element.

2. What is an Attribute in HTML?
Ans: Each and Every tag in HTML have its own attribute.
eg:
<img src =`` alt =``> In the image tag src and alt attributes for the tag. <a href=`` target =`` > In the anchor tag href and target is the attribute for the tag.

3. What are Headings?
Ans: Heading is nothing but <h1></h1> to <h6></h6> tags.
I must say this is one of the most favorite questions for Interviewers.
We have only Six heading tags in HTML and they have their own inherited properties.

4. What is a Paragraph?
Ans: The paragraph is nothing but
<p></p> tag. It is a block level element.

5. What are block and Inline Element?
Ans: A block level element always starts with new line that means it took 100% of width ignoring the width of the element. Meanwhile In-line element only takes up width as per elements width. And It will not starts with new line.
Few examples of Block level Elements : `
<aside>, <blockquote> ,<canvas>, <dd> ,<div>, <dl>, <dt>, <fieldset>, <figcaption> ,<figure>, <footer>, <form>, <h1>-<h6>, <header>, <hr> ,<li> <main> ,<nav>`

Few Examples of In-line Elements: <a>,<abbr>,<acronym>,<b>,<bdo>,<big>,<br>,<button>,<cite>,<code>,<dfn><em>,<i>,<img>,<input>,<label>.

--

--

Bajrang Bhushan

I am a Full-Stack Developer (MERN) and having basic knowledge of cloud platforms like AWS and GCP.