CLASS X Description lists in HTML NOTES

 Description lists in HTML are used to display a list of terms and their corresponding descriptions. Here’s a breakdown of the tags used:



  1. <dl> (Description List): Defines a description list. It’s a container for terms and their descriptions.

    • Example:
      <dl> <dt>HTML</dt> <dd>A markup language for creating web pages.</dd> <dt>CSS</dt> <dd>A style sheet language used for describing the look of a document written in HTML.</dd> </dl>
    • Output:

      HTML A markup language for creating web pages. CSS A style sheet language used for describing the look of a document written in HTML.
  2. <dt> (Definition Term): Defines a term or name in a description list. It is usually followed by one or more <dd> tags.

    • Example:

      <dl> <dt>Term 1</dt> <dd>Description for term 1.</dd> </dl>
  3. <dd> (Definition Description): Defines the description or definition of the term within a description list.

    • Example:
      <dl> <dt>Term 1</dt> <dd>Description for term 1.</dd> </dl>
    • Output:

      Term 1 Description for term 1.

Post a Comment

0 Comments