Here is a consolidated list of all important HTML and CSS definitions that are
frequently asked in interviews and exams.
🟦 HTML Important Definitions
1. HTML (HyperText Markup Language)
A standard markup language used to create web pages and
web applications.
2. Tag
An HTML element surrounded by angle brackets like <p>.
Tags define structure or behavior.
3. Attribute
Provides additional information about an element, such as
href, src, alt, etc.
4. Element
A complete structure in HTML consisting of a start tag,
content, and an end tag.
Example: <p>This is a paragraph.</p>
5. Self-closing Tag
Tags that do not need a closing tag.
Example: <br>, <img>, <hr>
6. Doctype Declaration
<!DOCTYPE html> tells the browser the version of HTML
being used.
7. Semantic Elements
Elements that clearly describe their meaning to both the
browser and developer.
Examples: <article>, <section>, <header>, <footer>
8. Hyperlink
Created using <a href="url"> to link one page to another.
9. Form
Used to collect user input; created using <form> and various
input types.
10. ID & Class
id: Unique identifier for one element (#id)
class: Used for multiple elements with similar styling (.class)
11. List Types
Ordered List: <ol>
Unordered List: <ul>
Description List: <dl>
12. HTML5
The latest version of HTML with new semantic elements,
multimedia support, and APIs.
13. Anchor Tag
<a> tag used to create hyperlinks.
14. Iframe
Embeds another HTML document within the current one.
15. Meta Tag
Provides metadata such as keywords, description, author,
and viewport settings.
🟩 CSS Important Definitions
1. CSS (Cascading Style Sheets)
A stylesheet language used for describing the look and
formatting of a document written in HTML.
2. Selector
Specifies which HTML elements to style.
Examples: h1, .class, #id, div p
3. Declaration Block
Contains CSS properties and values.
Example: { color: red; font-size: 16px; }
4. Property and Value
A CSS rule consists of a property (like color) and a value
(red).
5. Class Selector
Targets elements with a specific class name. Starts with a dot
(.).
6. ID Selector
Targets an element with a specific ID. Starts with a hash (#).
7. Inline, Internal, External CSS
Inline: inside the HTML tag
Internal: within <style> in HTML head
External: in a separate .css file
8. Box Model
Describes the rectangular boxes generated for elements.
Structure: Content → Padding → Border → Margin
9. Positioning
Controls the layout:
static (default)
relative (offset from normal)
absolute (relative to parent)
fixed (viewport)
sticky (based on scroll)
10. Display
Defines the display behavior of an element.
Examples: block, inline, none, flex, grid
11. Flexbox
One-dimensional layout model for aligning and distributing
items within a container.
12. Grid Layout
Two-dimensional layout model for rows and columns.
13. Media Queries
Allows responsive designs based on device width, height,
orientation, etc.
14. Z-index
Controls stack order of elements (which one appears on top).
15. Pseudo-classes
Style elements in a specific state (e.g., :hover, :first-child)
16. Pseudo-elements
Style specific parts of an element (e.g., ::before, ::after)
17. Animation & Transition
Transition: Smooth change from one property to another
Animation: Keyframe-based movement or effects
18. Overflow
Controls what happens to content that is too big to fit.
Values: visible, hidden, scroll, auto
19. Opacity
Controls the transparency of an element (0 = fully
transparent, 1 = fully visible).
20. Responsive Design
Technique to make websites work on different screen sizes
and devices.