Free Republic
Browse · Search
General/Chat
Topics · Post Article

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:

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:

GFG logo

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..........)
[ Post Reply | Private Reply | To 1 | View Replies ]


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.)
[ Post Reply | Private Reply | To 7 | View Replies ]

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.)
[ Post Reply | Private Reply | To 7 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson