DEV Community

Karthick (k)
Karthick (k)

Posted on

A mock HTML and CSS interview

16-05-2026

  1. What is the use of box sizing and box-sizing: border box?
    The box-sizing property allows us to include the padding and border in an element's total width and height.

  2. Block-level Elements
    Block-level elements always start on a new line, and browsers automatically add some space (a margin) before and after the element.

    • common Block-level elements are ,

      ,

      ,,,
  3. Inline Element:

    1. Inline as the name says "included as part of the main text and not as a separete section,
    2. Inline elements occupy the space as needed within the space defined by the main element.
    3. Unlike block-level elements, they do not begin on new lines.

    ex:Inline element are ,,,,,,

  4. Types of HTML elements

    1. Block-Level Elements
    2. Inline Elements
    3. Empty Elements box

  5. What is the box model?

    The CSS box model is a fundamental concept in web design that defines how HTML elements are structured and positioned on web pages.



Top comments (0)