×
  • Home
  • Te Houtaewa
  • HTML & CSS
  • Learning Plan
  • Identity and Value
  • Emotional Intelligence
  • DOM
  • Neuroplasticity
  • Te Whare Tapa Wha
  • Problem Solving
  • Foundations Reflection
  • Class VS ID



    Class

    This can be applied to multiple elements and can also be used for styling. There's multiple elements that can share the same class. When using class; it is written as class="example"
    In CSS, class is written as .example
    Class is commonly used for styling groups of elements. This attribute is used to determine one or more class names for an HTML element.

    class gif

    ID

    It is primarily used for styling and can exclusively identify a single element. When using ID; it is written as id="example"
    In CSS, ID is written as #example
    Only one element can have a specific ID.

    id