Creative_HTML_and_CSS_Presentation
Creative_HTML_and_CSS_Presentation
• HTML Structure:
- <!DOCTYPE html>: Declares the document type.
- <html>, <head>, <body>: Core structure of an HTML document.
• Common Tags:
- Headings: <h1> to <h6>.
- Paragraphs: <p>.
- Links: <a href="">.
- Images: <img src="" alt="">.
• Attributes: href, src, alt, class, id.
CSS Basics
• CSS Syntax:
- selector { property: value; }.
• Types of CSS:
- Inline: Within HTML elements.
- Internal: Defined inside a <style> tag in <head>.
- External: Linked via an external .css file.
• Example:
- p { color: blue; font-size: 16px; }
CSS Display Property
• display: block
- Takes full width, starts on a new line.
- Examples: <div>, <p>, <h1>.
• display: inline
- Takes only as much width as necessary, stays inline.
- Examples: <span>, <a>.
• display: inline-block
- Inline behavior but allows width/height settings.
- Useful for navigation menus and layouts.
Advanced HTML Concepts
• Best Practices:
- Use semantic HTML for accessibility.
- Keep CSS organized and reusable.
• Tools and Resources:
- Code Editors: VS Code, Sublime Text.
- Learning Resources: MDN Web Docs, W3Schools.