HTML में फ्लोटिंग इमेज का उपयोग करने के लिए, CSS प्रॉपर्टी float का उपयोग करें। यह आपको इमेज को बाएं या दाएं फ्लोट करने की अनुमति देता है। अधिक प्रॉपर्टी मानों में निम्नलिखित शामिल हैं:
| क्रमांक | प्रॉपर्टी मान और विवरण |
|---|---|
| 1 | none फ्लोट नहीं |
| 2 | left बाएं फ्लोट |
| 3 | right दाएं फ्लोट |
| 4 | initial डिफ़ॉल्ट मान |

उदाहरण
आप HTML में फ्लोटिंग इमेज का उपयोग करने के लिए निम्नलिखित कोड चलाने का प्रयास कर सकते हैं। यहां float right और float left CSS एट्रिब्यूट का उपयोग है:
<!DOCTYPE html> <html> <head> <title>HTML Floating Image</title> </head> <body> <h1>Float Right</h1> <p>The below image floats to the right.</p> <p> <img src="https://www.tutorialspoint.com/green/images/logo.png" style="float:right" width="190" height="84" /> This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </p> <h1>Float Left</h1> <p>The below image floats to the left.</p> <p> <img src="https://www.tutorialspoint.com/green/images/logo.png" style="float:left" width="190" height="84" /> This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </p> </body> </html>
आउटपुट
