HTML, CSS & Bootstrap Interview Notes for
Freshers
HTML Basics
HTML is used to structure web pages. Common tags: html, head, body, h1-h6, p, a, img, div, span,
form. Difference between id and class: id -> unique element. class -> can be reused on multiple
elements.
CSS Basics
CSS styles HTML elements. Types: Inline, Internal, External. Selectors: element, class(.), id(#). Box
Model: Content, Padding, Border, Margin.
Positioning
static: default. relative: moves relative to original position. absolute: relative to nearest positioned
parent. fixed: fixed to viewport. sticky: behaves relative then fixed.
Flexbox
display:flex; justify-content -> horizontal alignment. align-items -> vertical alignment. align-self ->
single item alignment.
Grid
display:grid; grid-template-columns. grid-template-rows. span occupies multiple rows/columns.
Bootstrap
Popular CSS framework. container, row, col classes. navbar component. btn classes. Responsive
design utilities.
Top Interview Questions
1. Difference between id and class? 2. Difference between flexbox and grid? 3. What is box model?
4. Relative vs absolute positioning? 5. Inline vs block elements? 6. What is Bootstrap? 7. Why use
media queries? 8. What is z-index? 9. What is semantic HTML? 10. How does external CSS work?