HTML Structure
Every HTML document starts with a !DOCTYPE html declaration, followed by the html, head, and body sections.
HTML Basics
HTML (HyperText Markup Language) is used to structure content on the web.
Common HTML Tags
| Tag | Description |
|---|---|
| h1 | Main heading tag |
| p | Paragraph text |
| a | Used to add links |
| img | Displays images |
| ul / ol | Used to create unordered and ordered lists |
| li | Defines each list item inside a list |
| table | Used to display data in rows and columns |
CSS Basics
CSS (Cascading Style Sheets) is used to style HTML elements.
To connect a CSS file to your HTML, use the link tag inside the head section. Example: link rel="stylesheet" href="style.css
- Selectors: element, class, ID
- Properties: color, font-size, margin, border, padding
Lists Example
Here’s an example of a nested list structure:
- Unordered List Item
- Order List Item
Tips for the Exam
Review how to link CSS files, use semantic tags, and understand how layout properties (like flexbox) work.
- Always close your HTML tags properly.
- Use consistent indentation for clean code.
- Link your CSS file correctly inside the head section.
- Remember the difference between inline, internal, and external CSS.
- Test your page in a browser after saving changes.