The required
src
attribute specifies the path (URL) to the image.
Note:
When a web page loads, it is the browser, at that moment, that gets the image from a web server and inserts it into the page. Therefore, make sure that the image actually stays in the same spot in relation to the web page, otherwise your visitors will get a broken link icon. The broken link icon and the
alt
text are shown if the browser cannot find the image.
Example:
HTML
<img src="img_chania.jpg" alt="Flowers in Chania">
Example of HTML Image Code | HTML Basic |
Definition HTML Images | HTML Basic |
HTML Images Syntax | HTML Basic |
The src Attribute of HTML Images | HTML Basic |
HTML Documents | HTML Basic |
HTML <!DOCTYPE> Declaration | HTML Basic |
HTML Headings | HTML Basic |
HTML Paragraphs | HTML Basic |
HTML Text Links | HTML Basic |
HTML Images | HTML Basic |
How to View HTML Source | HTML Basic |
Type
: |
html |
Category
: |
Web Tutorial |
Sub Category
: |
HTML Basic |
Uploaded by
: |
Admin |