To: Jim Noble
Adding Static Images
In many cases, you’ll want to include static images that have fixed sizes. This is useful for simple web pages where the layout is constant across all devices. Let’s take a look at a basic example.
Syntax:
<img src="image_path" alt="image_description" width="40%">
Where:
- src: Refers to the image file landscape.jpg located in the same directory as the HTML file.
- alt: Describes the image as “A scenic view of mountains and a lake.”
- width and height: Define the image size as 400x250 pixels. The easiest method is to use width percentage such as width="35%". This means the image will not distort and will only take up a certain amount on the FR page.
Example: This example shows the use of static images. When posting on FR you do not need the other webpage elements defined, such as <html> and <body> because you're already within a webpage.
<img src="https://media.geeksforgeeks.org/wp-content/uploads/20240911162743/GeeksforGeeks-Logo.png" alt="GFG logo" width="40%">
Output:

7 posted on
05/02/2026 10:04:48 AM PDT by
wildcard_redneck
( Neocons in love with the Ukraine War hate how long the Iran War is taking..........)
To: wildcard_redneck; Jim Noble
Good guide: The ‘alt’ part is optional, and so is the width, but width a good thing to provide. I will typically use pixels, as is ‘width=400’, but your mileage may vary.
9 posted on
05/02/2026 10:17:23 AM PDT by
alancarp
(George Orwell was an optimist.)
To: wildcard_redneck
11 posted on
05/02/2026 10:35:08 AM PDT by
Savage Beast
(When the student is ready, the teacher appears. When the people are ready, the hero appears.)
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson