Skip to main content

Command Palette

Search for a command to run...

5 Most Asked Interview Questions (Part 1)

Learning a little bit every day can lead us to noteworthy growth in knowledge over time

Updated
2 min read
5 Most Asked Interview Questions (Part 1)

HTML stands for HyperText Markup Language. It’s not a programming language as it lacks the features of programming languages. For instance, HTML is missing features like logic and control structure, code execution, as well as variables. But it is still a language and the most used language to create and design webpages. So, any developer seeking a job has to be ready to answer basic questions about HTML. Here are some, I provided to learn and grow together. The detailed information I provided will be helpful for better and easier understanding.

  1. Q. What does HTML stand for and what is its primary purpose?

    HTML stands for HyperText Markup Language. Think of it as the building blocks of the web. Its main purpose is to structure and organize content on a webpage so that browsers can display it correctly. It's like setting up a template for your web page.

  2. Q. Can you explain the basic structure of an HTML document?

    HTML documents start with a <!DOCTYPE html> declaration for letting the browser know that it’s an HTML5 document. Then, the tag <html> is used to wrap everything, and inside of that <head> tag is used for metadata and adding links like stylesheet. After that, the <body> section is used for all the visible content like text, images, and links. Different sections are used to organize the web page.

  3. Q. What are HTML tags, and how are they used? Provide examples of commonly used tags.

    Tags are markers that define different content. For example, <p> is used to define a paragraph, and </p> closes it. Other common tags include <h1> for headings and <a> for links. They help structure your content and make it readable.

  4. Q. What is the difference between <div> and <span> elements in HTML?

    the <div> element is similar to a large container that groups a collection of content, while <span> is a smaller container to style a part of text or a small section within other elements. Therefore, <div> is for blocks and <span> is for smaller, inline parts.

  5. Q. How do you add comments in HTML? Why are they used?

    Comments in HTML are added with <!-- at the start and --> at the end. For example: <!-- This is a comment -->. They’re super useful for adding notes or explanations to your code without affecting how the page looks.