HTML Interview Revision Cheat Sheet
1. What is HTML?
HTML (HyperText Markup Language) is the standard language used to create webpages. It structures
content using tags.
2. Basic Structure of an HTML Page:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>
3. Common HTML Tags:
<html> - Root element
<head> - Metadata (title, links, etc.)
<title> - Title in browser tab
<body> - Main content
<h1> to <h6> - Headings
<p> - Paragraph
<a> - Hyperlink
<img> - Image
<ul>, <ol>, <li> - Lists
<div> - Block container
<span> - Inline container
<br> - Line break
4. Example of Anchor Tag with Attributes:
<a href="https://example.com" target="_blank">Visit</a>
- href: link destination
HTML Interview Revision Cheat Sheet
- target="_blank": open link in new tab
5. Extra Tip:
HTML is not case-sensitive, but lowercase tags are preferred in HTML5.