1. Home
  2. Docs
  3. Web Technology I
  4. eXtensible Markup Languag...
  5. Elements and Attributes

Elements and Attributes

Here is the explanation of Elements and Attributes:

    <title>Introduction to XML</title>
    <author>John Doe</author>
<book category="programming" language="en">
    <title>XML Fundamentals</title>
    <author>Jane Smith</author>
<library location="Main Street">
    <book category="fiction">
        <title>The Great Gatsby</title>
        <author>F. Scott Fitzgerald</author>
    <book category="science">
        <title>A Brief History of Time</title>
        <author>Stephen Hawking</author>
  • The <library> element contains an attribute (location) providing additional information about the library.
  • Each <book> element has a category attribute, providing details about the type of book.
  • <title> and <author> are elements within the <book> elements, encapsulating the book’s title and author information.

How can we help?

Leave a Reply

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