Interview Questions

Frontend Interview Fundamentals

SCROLL DOWN

HTML Interview Questions (15)

1. What is HTML?

HTML is a markup language used to structure content on the web.

2. Why is HTML called a markup language?

Because it uses tags to mark and describe content.

3. What is an HTML element?

An element consists of opening tag, content, and closing tag.

4. Difference between tag and element?

A tag is a keyword, an element is the complete structure.

5. What are semantic tags?

Tags that describe meaning, like header, nav, section.

6. Why use semantic HTML?

It improves SEO, accessibility, and code readability.

7. Difference between div and span?

div is block-level, span is inline.

8. What is the purpose of alt attribute?

It helps accessibility and SEO.

9. What is the use of doctype?

It tells the browser which HTML version is used.

10. How many h1 tags should be used?

Only one h1 per page.

11. What is an attribute?

Attributes provide additional information to elements.

12. What is a form?

A form collects user input.

13. What is iframe?

It embeds another webpage inside a page.

14. What is meta tag?

It provides metadata like charset and description.

15. What is HTML5?

The latest version of HTML with semantic elements.

CSS Interview Questions (15)

1. What is CSS?

CSS styles and layouts web pages.

2. Why CSS is used?

To make websites visually appealing.

3. Types of CSS?

Inline, internal, and external CSS.

4. What is selector?

A selector targets HTML elements.

5. Difference between class and id?

Class is reusable, id is unique.

6. What is box model?

Margin, border, padding, and content.

7. What is Flexbox?

A layout method for alignment.

8. What is Grid?

A two-dimensional layout system.

9. What is position property?

Controls element positioning.

10. What is z-index?

Controls vertical stacking order.

11. What is responsive design?

Design that adapts to all screen sizes.

12. What is media query?

Used for responsive layouts.

13. What is overflow?

Controls content overflow.

14. What is display property?

Defines element display type.

15. What is pseudo-class?

Defines element state like :hover.

JavaScript Interview Questions (15)

1. What is JavaScript?

A programming language for interactivity.

2. Why JavaScript is used?

To handle dynamic behavior.

3. What is DOM?

Document Object Model.

4. What are variables?

Containers for data.

5. Difference between var, let, const?

var is function-scoped, let/const are block-scoped.

6. What is function?

A reusable block of code.

7. What is event?

User action like click.

8. What is event listener?

Listens to user actions.

9. What is array?

A collection of values.

10. What is object?

A collection of key-value pairs.

11. What is loop?

Repeats code execution.

12. What is conditional statement?

Executes code based on condition.

13. What is fetch?

Used to get data from server.

14. What is JSON?

Data exchange format.

15. What is async/await?

Handles asynchronous operations.

Git & GitHub Interview Questions (15)

1. What is Git?

A version control system.

2. What is GitHub?

A Git repository hosting platform.

3. Difference between Git and GitHub?

Git is a tool, GitHub is a platform.

4. What is repository?

A project storage location.

5. What is commit?

A snapshot of changes.

6. What is branch?

A separate line of development.

7. What is merge?

Combining branches.

8. What is clone?

Copying repo locally.

9. What is push?

Uploading code to remote.

10. What is pull?

Fetching latest changes.

11. What is remote?

Online repo connection.

12. What is fork?

Copy of repository.

13. What is pull request?

Request to merge code.

14. What is CI/CD?

Automated integration and deployment.

15. What is GitHub Pages?

Free static website hosting.

Linux Interview Questions (15)

1. What is Linux?

An open-source operating system.

2. Why Linux is used?

Secure, stable, and free.

3. What is terminal?

Command-line interface.

4. What does ls do?

Lists files.

5. What does cd do?

Changes directory.

6. What is pwd?

Shows current path.

7. What is mkdir?

Creates directory.

8. What is touch?

Creates file.

9. What is rm?

Deletes file.

10. What is cp?

Copies files.

11. What is mv?

Moves or renames files.

12. What is root directory?

The top-level directory.

13. What are permissions?

Read, write, execute access.

14. Why Linux for servers?

High stability and security.

15. Linux in CI/CD?

Most pipelines run on Linux.