Semantic-UI | Images

Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website look more amazing. It uses a class to add CSS to the elements.
There are different styles of putting images in our web app using semantic-ui to make out website look more awesome. You can put an image or an SVG.
Let’s see some example of how to use semantic-ui for putting images.

Example: This example display a simple image using semantic-ui.

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>Semantic UI</title>
    <link href=
        rel="stylesheet" />
  
    <script src=
    </script>
</head>
  
<body>
    <div class="ui container">
        <h1>Image</h1>
        <img class="ui small image" src=
    </div>
</body>
  
</html>

chevron_right


Output:
 

Example: This example adding a border to the image.



HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>Semantic UI</title>
        <link href=
              rel="stylesheet" />
    </head>
  
    <body>
        <div class="ui container">
            <h1>Bordered Image</h1>
            <img class="ui medium bordered image" 
                 src=
        </div>
        <script src=
      </script>
    </body>
</html>

chevron_right


Output:
 

You can see the border exactly by running the example in IDE.

Example: This example creating a Circular Image.

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>Semantic UI</title>
        <link href=
              rel="stylesheet" />
    </head>
  
    <body>
        <div class="ui container">
            <h1>Circular Bordered Image</h1>
            <img class="ui medium circular bordered image" 
                 src=
        </div>
        <script src=
      </script>
    </body>
</html>

chevron_right


Output:
 

Example: This example creating a Vertically aligned Images.

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>Semantic UI</title>
        <link href=
         rel="stylesheet" />
    </head>
  
    <body>
        <div class="ui container">
            <h1>Vertically Aligned Images</h1>
            <img class="ui top aligned small image" 
                 src=
            <p>Aligned at Top</p>
            <div class="ui divider"></div>
            <img class="ui middle aligned small image" src=
            <p>Aligned at Middle</p>
            <div class="ui divider"></div>
            <img class="ui bottom aligned small image" src=
            <p>Aligned at Bottom</p>
        </div>
        <script src=
      </script>
    </body>
</html>

chevron_right


Output: 
 

Note: You can add class mini, tiny, small, medium, large, massive to change the size. You can run any of this example by clicking on Run on IDE.
 




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.