Reputation: 77
The question I'm working on:
Now, I (approximately) do most of this:
<img src="http:/webpages/resources/img/logo.jpg">
However I cannot find an example of how or where to specify the port number using a path like this.
Could anyone help point out to me where to include it? (And also if my progress above is actually correct?)
Upvotes: 0
Views: 12605
Reputation: 96607
The port comes directly after the hostname, separated by :
.
http://example.com:80/
http://example.com:80/path
Relevant specifications:
IETF’s URI standard: port
subcomponent (part of the authority
component)
WHATWG’s URL standard: scheme-relative-special-URL string
Upvotes: 4
Reputation: 323
http = Hypertext Transfer Protocol, use port 80 as default. You don't need to put :80 after the domain.
You need '/' after the http protocol:
<img src="http://webpages/resources/img/logo.jpg">
If the image is on the same server, you can use this:
<img src="resources/img/logo.jpg">
You're pointing to the resources folder, if your folder is on a lower folder level, you can use:
<img src="../resources/img/logo.jpg">
Upvotes: 0