XML — Elements Reference
Root Element
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- Content -->
</root>
Common Elements
| Element | Description |
|---|---|
<element> | Basic element |
<element attr="val"/> | Self-closing |
<element>text</element> | With text |
<element><child/></element> | Nested |
Special Elements
| Element | Description |
|---|---|
| CDATA | <![CDATA[...]]> |
| Comment | <!-- ... --> |
| Processing Instruction | <?target ...?> |
XHTML Elements
| Element | Description |
|---|---|
<html> | Document root |
<head> | Head section |
<body> | Body section |
<div> | Division |
<span> | Inline container |
<p> | Paragraph |
SVG Elements
| Element | Description |
|---|---|
<svg> | SVG root |
<circle> | Circle shape |
<rect> | Rectangle |
<path> | Path |
<text> | Text |
Mini Practice
- Create basic XML elements
- Use CDATA sections
- Add processing instructions
- Explore SVG elements
Up Next
Continue with Attributes Reference — complete attribute reference.
Related Topics
Frequently Asked Questions about Elements Reference
What is Elements Reference in XML?
Elements Reference is a fundamental concept in XML. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Elements Reference?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Elements Reference.
Why is Elements Reference important in XML?
Elements Reference is essential for XML development. Understanding this concept will help you write better code and solve real-world problems more effectively.