Difference between absolute and relative URL in HTML

Understand when to use absolute vs relative URLs in HTML. Clear examples showing how each type works, their pros and cons.