27. What is the difference between href and src?
href generally identifies a referenced destination or relationship, such as a hyperlink or stylesheet. src generally identifies an external resource that an element embeds or loads, such as an image or script.
Key Takeaways
- href and src serve different resource-loading semantics.
- Use the attribute appropriate to the HTML element.
Knowledge Check
Which attribute is used by an anchor to identify its destination?