| Core Concept | Summary |
|---|---|
| Logical File Structure & Assets | Always begin with a consistent project folder containing an index.html file in the root. Use a dedicated assets sub-folder to logically group all non-HTML files into css, img, and videos. This organization prevents broken links and ensures smooth project sharing. |
| VS Code & Emmet for Productivity | Visual Studio Code is the industry standard and should be customized with extensions like HTMLHint for error checking. Utilize Emmet abbreviations (e.g., typing ul>li*3) to expand into complex HTML structures instantly. This saves significant time by focusing on structure rather than repetitive typing. |
| Web Hosting with GitHub Pages | To make a site public, create a GitHub repository named exactly username.github.io. Upload your index.html and assets folder via drag-and-drop or Git to publish. The site will then be accessible to anyone at that specific URL. |
| Core Concept | Summary |
|---|---|
| Basic Document Structure & Metadata | HTML pages require a <head> for technical data and a <body> for visible content. Use a descriptive <title> and <meta name="description"> to optimize for search engines (SEO). All visual elements must be nested correctly within the body tag using appropriate tags. |
| High-Leverage Semantic Tags | Use tags like <header>, <nav>, <main>, and <footer> to give meaning to your layout. The <main> tag holds the primary content, while <section> tags divide it into logical blocks. This is vital for accessibility as screen readers use these tags to navigate. |
| Responsive Image Insertion & Alt Text | Embed images using the <img> tag with a correct file path in the src attribute. The alt attribute is mandatory to describe the image for visually impaired users or if the file fails to load. Use JPG for photos and PNG for images requiring transparency. |
| Core Concept | Summary |
|---|---|
| CSS Linking, Selectors, and Rules | Link CSS to HTML using the <link> tag in the head. Target elements with selectors, followed by rules containing a property (e.g., color) and a value (e.g., blue). Always end each rule with a semicolon to avoid rendering errors. |
| Classes & Custom Properties | Use CSS classes (target with a .) to apply styles to specific elements. Define Custom Properties (e.g., --brand-color) to store reusable values throughout your stylesheet. This allows you to change a site-wide color by updating just one line of code. |
| Fluid Typography & Readability | Use the clamp() function to allow text to scale smoothly between a minimum and maximum size based on the screen width. Set a line-height between 1.5 and 1.7 to improve readability through vertical spacing. Always provide a fallback font like sans-serif for design resilience. |
| Z-Index & Stacking (Hero Blocks) | To layer text over images, use position: relative on the parent and position: absolute on the child. Use the z-index property to control the stacking order (higher numbers come forward). This is the foundation for creating modern "Hero" sections. |
| Core Concept | Summary |
|---|---|
| Hyperlinks and State Styling | Use the <a> tag with the href attribute to link to other pages. Style interactive states like :hover, :focus, and :active to give users visual feedback. Applying a transition rule ensures these visual changes appear smooth rather than abrupt. |
| Accessibility & Color Contrast | Always check that your text and background colors have a contrast ratio of at least 4.5:1. This ensures your content is readable by everyone, including those with visual impairments. High contrast is a non-negotiable standard for professional web development. |
| Responsive Video Embedding | Wrap video <iframe> tags in a container div with position: relative. Apply a specific aspect-ratio (like 16/9) in CSS to ensure the video stays responsive across all devices. This prevents the video from being cut off or distorted on smaller mobile screens. |