The src and href attributes are both used to specify the address of the resource, but the purposes and usage scenarios are different: 1. The src attribute is used to specify the address of the external resource, and the href attribute is used to specify the target address of the hyperlink; 2. The src attribute is used when introducing media elements, and the href attribute is usually used in the tag; 3. The src attribute tells the browser to load the specified resource and embed it into the current page, and the href attribute defines The URL of the web page, document, or other resource that the user will open after clicking.
# Operating system for this tutorial: Windows 10 system, Dell G3 computer.
The src and href attributes are both used to specify the address of the resource, but their purposes and usage scenarios are different.
The src attribute (source) is used to specify the address of external resources and is used when introducing media elements (such as ,