Understanding HTML
HTML, or HyperText Markup Language, is the standard markup language used to create web pages. It provides the structure of a website, which is enhanced and styled using CSS. Here, we will go through some common HTML interview questions and their answers.
Basic HTML Questions
1. What does HTML stand for?
- HTML stands for HyperText Markup Language.
2. What is the purpose of the declaration?
- The declaration defines the document type and version of HTML being used. It helps the browser to render the page correctly.
3. Explain the difference between block-level and inline elements.
- Block-level elements take up the full width available and start on a new line (e.g., `
`, ``). Inline elements only take up as much width as necessary and do not start on a new line (e.g., ``, ``, `
`, `