Open In App

How to Print a Picture in a Sublime Text File ?

The Sublime Text is a versatile and powerful text editor renowned for its simplicity, speed, and extensive customization options. While it's primarily used for editing code it also supports various file formats including text files with the embedded images. However, Sublime Text itself doesn't have native support for displaying images within the editor. Instead, we can embed images using the HTML markup.

Approach

<img src="image.jpg" alt="Description of the Image">

Example: The provided example demonstrates embedding an image in the Sublime Text file using the HTML. It includes an <img> tag with src attribute pointing to the online image and an alt attribute for the describing the image.

<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,
                                   initial-scale=1.0">
    <title>Image</title>
</head>
  
<body>
    <img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20240412124006/gfg12.jpg"
         alt="Example Image">
    <p>
          This is an example of embedding an 
          image in a Sublime Text file using HTML.
      </p>
</body>
  
</html>

Output:

czzzzzzz

Article Tags :