Semantic-UI | Placeholder

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. A placeholder is used to reserve space for content that soon will appear in a layout.

Below are examples of the different types of placeholders.

Example 1:

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">
            <h2>Placeholder</h2>
            <div class="ui placeholder">
                <div class="image header">
                    <div class="line"></div>
                    <div class="line"></div>
                </div>
                <div class="paragraph">
                    <div class="line"></div>
                    <div class="line"></div>
                    <div class="line"></div>
                    <div class="line"></div>
                    <div class="line"></div>
                </div>
            </div>
        </div>
        <script src=
    </script>
    </body>
</html>

chevron_right


Output

Example 2:



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">
            <h3>Inline Card Placeholder</h3>
            <div class="ui four column grid">
                <div class="column">
                    <div class="ui raised segment">
                        <div class="ui placeholder">
                            <div class="image header">
                                <div class="short line"></div>
                                <div class="medium line"></div>
                            </div>
                            <div class="paragraph">
                                <div class="large line"></div>
                                <div class="medium line"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui raised segment">
                        <div class="ui placeholder">
                            <div class="image header">
                                <div class="short line"></div>
                                <div class="medium line"></div>
                            </div>
                            <div class="paragraph">
                                <div class="large line"></div>
                                <div class="medium line"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui raised segment">
                        <div class="ui placeholder">
                            <div class="image header">
                                <div class="short line"></div>
                                <div class="medium line"></div>
                            </div>
                            <div class="paragraph">
                                <div class="large line"></div>
                                <div class="medium line"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="ui raised segment">
                        <div class="ui placeholder">
                            <div class="image header">
                                <div class="short line"></div>
                                <div class="medium line"></div>
                            </div>
                            <div class="paragraph">
                                <div class="large line"></div>
                                <div class="medium line"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src=
    </script>
    </body>
</html>

chevron_right


Output

Example 3: This is the placeholder for Image.

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">
            <h3>Placeholder for Images</h3>
            <div style="width: 150px;" 
                 class="ui placeholder">
                <div class="image"></div>
            </div>
            <div style="width: 150px;" 
                 class="ui placeholder">
                <div class="image"></div>
            </div>
        </div>
        <script src=
        </script>
    </body>
</html>

chevron_right


Output

Example 4: This is for the inverted Placeholders.

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">
            <h3>Inverted Placeholders</h3>
            <div class="ui inverted segment">
                <div class="ui active inverted placeholder">
                    <div class="image header">
                        <div class="line"></div>
                        <div class="line"></div>
                    </div>
                    <div class="paragraph">
                        <div class="line"></div>
                        <div class="line"></div>
                        <div class="line"></div>
                    </div>
                </div>
            </div>
            <div class="ui inverted segment">
                <div class="ui active inverted placeholder">
                    <div class="image header">
                        <div class="line"></div>
                        <div class="line"></div>
                    </div>
                    <div class="paragraph">
                        <div class="line"></div>
                        <div class="line"></div>
                        <div class="line"></div>
                    </div>
                </div>
            </div>
        </div>
        <script src=
</script>
    </body>
</html>

chevron_right


Output




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.