Home > Common Problem > body text

What is the difference between src and href

尊渡假赌尊渡假赌尊渡假赌
Release: 2023-10-16 11:15:55
Original
2167 people have browsed it

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.

What is the difference between src and href

# 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.