HTML & CSS interview question · Most asked
What is HTML?
Summary
HTML (HyperText Markup Language) is the standard language for the structure and meaning of web pages. It uses elements written as tags to say what each piece of content is: headings, paragraphs, links, images, forms. Browsers read it and draw the page.
Longer Answer
HTML is a markup language, not a programming language: it describes content rather than computing anything. It works with CSS (presentation) and JavaScript (behaviour). HyperText refers to links between documents, the core idea of the World Wide Web, which Tim Berners-Lee created at CERN between 1989 and 1991.
Key Points
- Markup language for structure and meaning.
- Elements and tags.
- CSS styles it, JavaScript adds behaviour.
- Invented by Tim Berners-Lee at CERN.
Deep dive: HTML5 for Beginners: What Is the Web, and What Is HTML?
Explanation
What interviewers look for
A clear definition and the separation between HTML, CSS and JavaScript.
Follow-up questions
- Is HTML a programming language?
- What does a browser do with an HTML file?
More most-asked HTML & CSS questions
- What is ARIA, and what is the first rule of ARIA?
- What is HTML5, and how is it different from HTML 4?
- What is semantic HTML, and why does it matter?
- What is the alt attribute for, and what makes good alt text?
- What input types and validation attributes did HTML5 add?
- What is the difference between script, script async and script defer?
- Compare localStorage, sessionStorage and cookies.
- What does <!DOCTYPE html> do?