1 Minute HTML CSS Part 3 – Nesting & Comments

NESTING

<h1>Hello World</h1>
<p>
  HTML is nothing but text with formatting.
  This is <strong>bold,</strong> this is not.
</p>
  • Nesting – When we put a tag inside a tag.
  • Not all “combinations” are correct, examples:
    • Makes no sense to put another <h1> in <h1>.
    • Makes no sense to put <h1> in <p>.
  • The best way to learn is to search the Internet when in doubt. Example – “Can I put a header in paragraph HTML”

 

COMMENTS

<!-- This is a comment -->
  • Anything enclosed with <!-- and --> are comments and will not be displayed on the page.
  • Comments are used to keep notes among developers.

Leave a Comment

Your email address will not be published. Required fields are marked *