Home  >  Article  >  What is the difference between src and href

What is the difference between src and href

尊渡假赌尊渡假赌尊渡假赌
尊渡假赌尊渡假赌尊渡假赌Original
2023-10-16 11:15:552149browse

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.