📚 Top 10 HTML Interview Questions With Answers
1. What is HTML?
HTML (HyperText Markup Language) is the standard language used to create and design web pages. It structures content by using elements and tags.
2. What are the different types of HTML tags?
There are block-level tags (like
3. What is the difference between HTML elements and tags?
A tag is the markup itself (e.g.,
4. What are semantic HTML elements?
Semantic elements clearly describe their meaning in a human- and machine-readable way. Examples include
5. What is the purpose of the
The
6. What are the different ways to include CSS in an HTML page?
CSS can be added via inline styles (
7. What is the difference between an ID and a Class in HTML?
ID is unique within a page and is used to identify a single element, while class can be assigned to multiple elements for styling or scripting.
8. How do you create a hyperlink in HTML?
Using the
9. What are HTML forms used for?
Forms collect user input and submit data to a server for processing, with tags like
10. What is the role of the
Meta tags provide metadata about the HTML document such as character set, page description, viewport settings, and SEO info.
Double Tap ♥️ For More
1. What is HTML?
HTML (HyperText Markup Language) is the standard language used to create and design web pages. It structures content by using elements and tags.
2. What are the different types of HTML tags?
There are block-level tags (like
<div>
, <p>
, <h1>
) which start on a new line, and inline tags (like <span>
, <a>
, <img>
) which do not start on a new line.3. What is the difference between HTML elements and tags?
A tag is the markup itself (e.g.,
<p>
), while an element includes the opening tag, content, and closing tag (<p>Content</p>
).4. What are semantic HTML elements?
Semantic elements clearly describe their meaning in a human- and machine-readable way. Examples include
<header>
, <footer>
, <article>
, and <section>
.5. What is the purpose of the
doctype
declaration in HTML? The
<!DOCTYPE html>
declaration defines the document type and version of HTML, helping browsers render the page correctly.6. What are the different ways to include CSS in an HTML page?
CSS can be added via inline styles (
style
attribute), internal styles (<style>
tag inside <head>
), or external style sheets linked via <link>
tag.7. What is the difference between an ID and a Class in HTML?
ID is unique within a page and is used to identify a single element, while class can be assigned to multiple elements for styling or scripting.
8. How do you create a hyperlink in HTML?
Using the
<a>
tag with an href
attribute, e.g., <a href="https://example.com">Link</a>
.9. What are HTML forms used for?
Forms collect user input and submit data to a server for processing, with tags like
<form>
, <input>
, <textarea>
, <button>
, and more.10. What is the role of the
<meta>
tag in HTML? Meta tags provide metadata about the HTML document such as character set, page description, viewport settings, and SEO info.
Double Tap ♥️ For More
❤7
🔥 Ultimate Coding Interview Cheat Sheet (2025 Edition)
✅ 1. Data Structures
Key Concepts:
• Arrays/Lists
• Strings
• Hashmaps (Dicts)
• Stacks & Queues
• Linked Lists
• Trees (BST, Binary)
• Graphs
• Heaps
Practice Questions:
• Reverse a string or array
• Detect duplicates in an array
• Find missing number
• Implement stack using queue
• Traverse binary tree (Inorder, Preorder)
✅ 2. Algorithms
Key Concepts:
• Sorting (Quick, Merge, Bubble)
• Searching (Binary search)
• Recursion
• Backtracking
• Divide & Conquer
• Greedy
• Dynamic Programming
Practice Questions:
• Fibonacci with DP
• Merge sort implementation
• N-Queens Problem
• Knapsack problem
• Coin change
✅ 3. Problem Solving Patterns
Important Patterns:
• Two Pointers
• Sliding Window
• Fast & Slow Pointer
• Recursion + Memoization
• Prefix Sum
• Binary Search on answer
Practice Questions:
• Longest Substring Without Repeat
• Max Sum Subarray of Size K
• Linked list cycle detection
• Peak Element
✅ 4. System Design Basics
Key Concepts:
• Scalability, Load Balancing
• Caching (Redis)
• Rate Limiting
• APIs and Databases
• CAP Theorem
• Consistency vs Availability
Practice Projects:
• Design URL shortener
• Design Twitter feed
• Design chat system (e.g., WhatsApp)
✅ 5. OOP & Programming Basics
Key Concepts:
• Classes & Objects
• Inheritance, Polymorphism
• Encapsulation, Abstraction
• SOLID Principles
Practice Projects:
• Design a Library System
• Implement Parking Lot
• Bank Account Simulation
✅ 6. SQL & Database Concepts
Key Concepts:
• Joins (INNER, LEFT, RIGHT)
• GROUP BY, HAVING
• Subqueries
• Window Functions
• Indexing
Practice Queries:
• Get top 3 salaries
• Find duplicate emails
• Most frequent orders per user
👍 Double Tap ♥️ For More
✅ 1. Data Structures
Key Concepts:
• Arrays/Lists
• Strings
• Hashmaps (Dicts)
• Stacks & Queues
• Linked Lists
• Trees (BST, Binary)
• Graphs
• Heaps
Practice Questions:
• Reverse a string or array
• Detect duplicates in an array
• Find missing number
• Implement stack using queue
• Traverse binary tree (Inorder, Preorder)
✅ 2. Algorithms
Key Concepts:
• Sorting (Quick, Merge, Bubble)
• Searching (Binary search)
• Recursion
• Backtracking
• Divide & Conquer
• Greedy
• Dynamic Programming
Practice Questions:
• Fibonacci with DP
• Merge sort implementation
• N-Queens Problem
• Knapsack problem
• Coin change
✅ 3. Problem Solving Patterns
Important Patterns:
• Two Pointers
• Sliding Window
• Fast & Slow Pointer
• Recursion + Memoization
• Prefix Sum
• Binary Search on answer
Practice Questions:
• Longest Substring Without Repeat
• Max Sum Subarray of Size K
• Linked list cycle detection
• Peak Element
✅ 4. System Design Basics
Key Concepts:
• Scalability, Load Balancing
• Caching (Redis)
• Rate Limiting
• APIs and Databases
• CAP Theorem
• Consistency vs Availability
Practice Projects:
• Design URL shortener
• Design Twitter feed
• Design chat system (e.g., WhatsApp)
✅ 5. OOP & Programming Basics
Key Concepts:
• Classes & Objects
• Inheritance, Polymorphism
• Encapsulation, Abstraction
• SOLID Principles
Practice Projects:
• Design a Library System
• Implement Parking Lot
• Bank Account Simulation
✅ 6. SQL & Database Concepts
Key Concepts:
• Joins (INNER, LEFT, RIGHT)
• GROUP BY, HAVING
• Subqueries
• Window Functions
• Indexing
Practice Queries:
• Get top 3 salaries
• Find duplicate emails
• Most frequent orders per user
👍 Double Tap ♥️ For More
❤10
🚀 AI Journey Contest 2025: Test your AI skills!
Join our international online AI competition. Register now for the contest! Award fund — RUB 6.5 mln!
Choose your track:
· 🤖 Agent-as-Judge — build a universal “judge” to evaluate AI-generated texts.
· 🧠 Human-centered AI Assistant — develop a personalized assistant based on GigaChat that mimics human behavior and anticipates preferences. Participants will receive API tokens and a chance to get an additional 1M tokens.
· 💾 GigaMemory — design a long-term memory mechanism for LLMs so the assistant can remember and use important facts in dialogue.
Why Join
Level up your skills, add a strong line to your resume, tackle pro-level tasks, compete for an award, and get an opportunity to showcase your work at AI Journey, a leading international AI conference.
How to Join
1. Register here.
2. Choose your track.
3. Create your solution and submit it by 30 October 2025.
🚀 Ready for a challenge? Join a global developer community and show your AI skills!
Join our international online AI competition. Register now for the contest! Award fund — RUB 6.5 mln!
Choose your track:
· 🤖 Agent-as-Judge — build a universal “judge” to evaluate AI-generated texts.
· 🧠 Human-centered AI Assistant — develop a personalized assistant based on GigaChat that mimics human behavior and anticipates preferences. Participants will receive API tokens and a chance to get an additional 1M tokens.
· 💾 GigaMemory — design a long-term memory mechanism for LLMs so the assistant can remember and use important facts in dialogue.
Why Join
Level up your skills, add a strong line to your resume, tackle pro-level tasks, compete for an award, and get an opportunity to showcase your work at AI Journey, a leading international AI conference.
How to Join
1. Register here.
2. Choose your track.
3. Create your solution and submit it by 30 October 2025.
🚀 Ready for a challenge? Join a global developer community and show your AI skills!
❤7👌2👍1
Here are some tricky🧩 SQL interview questions!
1. Find the second-highest salary in a table without using LIMIT or TOP.
2. Write a SQL query to find all employees who earn more than their managers.
3. Find the duplicate rows in a table without using GROUP BY.
4. Write a SQL query to find the top 10% of earners in a table.
5. Find the cumulative sum of a column in a table.
6. Write a SQL query to find all employees who have never taken a leave.
7. Find the difference between the current row and the next row in a table.
8. Write a SQL query to find all departments with more than one employee.
9. Find the maximum value of a column for each group without using GROUP BY.
10. Write a SQL query to find all employees who have taken more than 3 leaves in a month.
These questions are designed to test your SQL skills, including your ability to write efficient queries, think creatively, and solve complex problems.
Here are the answers to these questions:
1. SELECT MAX(salary) FROM table WHERE salary NOT IN (SELECT MAX(salary) FROM table)
2. SELECT e1.* FROM employees e1 JOIN employees e2 ON e1.manager_id = (link unavailable) WHERE e1.salary > e2.salary
3. SELECT * FROM table WHERE rowid IN (SELECT rowid FROM table GROUP BY column HAVING COUNT(*) > 1)
4. SELECT * FROM table WHERE salary > (SELECT PERCENTILE_CONT(0.9) WITHIN GROUP (ORDER BY salary) FROM table)
5. SELECT column, SUM(column) OVER (ORDER BY rowid) FROM table
6. SELECT * FROM employees WHERE id NOT IN (SELECT employee_id FROM leaves)
7. SELECT *, column - LEAD(column) OVER (ORDER BY rowid) FROM table
8. SELECT department FROM employees GROUP BY department HAVING COUNT(*) > 1
9. SELECT MAX(column) FROM table WHERE column NOT IN (SELECT MAX(column) FROM table GROUP BY group_column)
1. Find the second-highest salary in a table without using LIMIT or TOP.
2. Write a SQL query to find all employees who earn more than their managers.
3. Find the duplicate rows in a table without using GROUP BY.
4. Write a SQL query to find the top 10% of earners in a table.
5. Find the cumulative sum of a column in a table.
6. Write a SQL query to find all employees who have never taken a leave.
7. Find the difference between the current row and the next row in a table.
8. Write a SQL query to find all departments with more than one employee.
9. Find the maximum value of a column for each group without using GROUP BY.
10. Write a SQL query to find all employees who have taken more than 3 leaves in a month.
These questions are designed to test your SQL skills, including your ability to write efficient queries, think creatively, and solve complex problems.
Here are the answers to these questions:
1. SELECT MAX(salary) FROM table WHERE salary NOT IN (SELECT MAX(salary) FROM table)
2. SELECT e1.* FROM employees e1 JOIN employees e2 ON e1.manager_id = (link unavailable) WHERE e1.salary > e2.salary
3. SELECT * FROM table WHERE rowid IN (SELECT rowid FROM table GROUP BY column HAVING COUNT(*) > 1)
4. SELECT * FROM table WHERE salary > (SELECT PERCENTILE_CONT(0.9) WITHIN GROUP (ORDER BY salary) FROM table)
5. SELECT column, SUM(column) OVER (ORDER BY rowid) FROM table
6. SELECT * FROM employees WHERE id NOT IN (SELECT employee_id FROM leaves)
7. SELECT *, column - LEAD(column) OVER (ORDER BY rowid) FROM table
8. SELECT department FROM employees GROUP BY department HAVING COUNT(*) > 1
9. SELECT MAX(column) FROM table WHERE column NOT IN (SELECT MAX(column) FROM table GROUP BY group_column)
❤2