⫸ What is Context API? What is the purpose of Context API?
Answer: The Context API is a React structure that enables you to exchange unique details and assists in solving prop-drilling from all levels of your application.
⚜ Uses of Context API:
- → One information, we can share with multiple children component.
- → Context API is used to avoid Prop Drilling.
- → State Management
- → Theme uses purpose (dark theme, light theme)
- → Website Translate (English to Bengali)
⫸ What is Semantic Tag?
Answer: A semantic element clearly describes its meaning to both the browser and the developer.
⚜ Advantages of Semantic Tag:
- → It makes web pages more informative and adaptable, allowing browsers and search engines to better interpret content.
- → Semantics is concerned with meaning.
- → The pages made with semantic elements are much easier to read.
- → It offers a better user experience.
- → Screen readers and browsers can interpret Semantic HTML better, which makes it more accessible.
- → Some Example of Semantic Tags are article, aside, details, figcaption, figure, footer, header, main, nav, section etc.
⫸ Difference among inline, block, inline-block elements?
Answer:
⚜ Properties of inline elements:
- → Inline elements don't start in a new line.
- → Inline elements Examples: links, strong, span, img etc.
⚜ Properties of block elements:
- → Block elements always start in a line.
- → Block elements examples: paragraphs, headings, lists and list items, div, header, footer, main, section etc.
⚜ Properties of inline-block elements:
- → inline-block allows to set a width and height on the element.
- → Inline-block elements are similar to inline elements, except they can have padding and margins added on all four sides.