Semantic-UI Menu Active State Last Updated : 29 Mar, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report Semantic UI open-source framework gives icons or glyphs that are used to show pictures related to some elements using CSS and jQuery that is used to create great user interfaces. It is a development framework used to create beautiful and responsive layouts. Semantic UI Menu is a group of elements that displays different navigation actions. We can navigate to different pages of the website. A menu can be a combination of links, a search bar, and dropdowns. Semantic UI Menu Active State specifies that the item is clicked and active. The button appears in darker contrast to other buttons or links. Semantic UI Menu Active State Class: active: Adding this class to the item, the item becomes active. Syntax: Add the class active to the item as follows: <div class="link active item"> Machine Learning </div> Example: In the following example, if the user clicks on any link, the item becomes active, and if clicked again, it becomes inactive. HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" /> </script> </head> <body> <div class="ui container"> <center> <div class="ui header green"> <h1>GeeksforGeeks</h1> </div> <strong>Semantic UI Menu Active State</strong> <br /> <br /> </center> <div class="ui compact menu"> <div class="header item"> GeeksforGeeks </div> <a class="item" href= "https://www.geeksforgeeks.org/data-structures" target="_blank"> Data Structures </a> <a class="item" href= "https://www.geeksforgeeks.org/fundamentals-of-algorithms" target="_blank"> Algorithms </a> <div class="link item"> Machine Learning </div> </div> </div> <script> $('.item').click(function() { $(this).toggleClass('active') }) </script> </body> </html> Output: Reference: https://semantic-ui.com/collections/menu.html#active Comment More infoAdvertise with us Next Article Semantic-UI Menu Hover State M manavsarkar07 Follow Improve Article Tags : Web Technologies CSS Semantic-UI Semantic-UI Collections Similar Reads Semantic-UI Dimmer Active State Semantic UI is an open-source UI framework that uses CSS and jQuery to enable developers to develop great web experiences faster. It can also be used with other CSS frameworks like Bootstrap. A Dimmer module is used to make the user focus on specific content and dims the other distractions. In this 2 min read Semantic-UI Menu Hover State Semantic UI open-source framework gives icons or glyphs that are used to show pictures related to some elements using CSS and jQuery that is used to create great user interfaces. It is a development framework used to create beautiful and responsive layouts. Semantic UI Menu is a group of elements th 2 min read Semantic-UI Modal Active State 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. Semantic UI Modal displays content above the screen that temporarily blocks interacti 2 min read Semantic-UI Loader Active State Semantic UI is an open-source development framework that provides pre-defined classes to make our website look beautiful, amazing, and responsive. It is similar to Bootstrap which has predefined classes. It uses jQuery and CSS to create interactive interfaces. It can also be directly used via CDN li 2 min read Semantic-UI Reveal Active State 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. In this article, we are going to learn about Reveal Active State. It is equipped wit 2 min read Semantic-UI Menu States 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 make your website look more amazing. It uses a class to add CSS to the elements. The menu is used to group items that are used to 2 min read Like