XML TutorialLesson 6Free preview
XML Elements
This lesson is part of XML · All levels
Summary
XML elements consist of the opening tag, content (text, attribute, or child), and the closing tag. The name of the element should begin with a letter or underscore, should not contain spaces, and should be descriptive so that the data is easy to understand. Elements can also be self-closed if they do not contain content.
Key points
- Elements = opening tag + content + closing tag
- The name of the element must not contain spaces and must be preceded by a letter/underscore
- XML is case-sensitive so the name of the element must be consistent
- The empty elements are written self-closing with an end />
- Elements may contain text, attributes, or child elements
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.