Open In App

Semantic-UI Image Header Content

Last Updated : 08 Mar, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

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 header provides a short summary of content and it’s can contain 3 content Image, Icon, and Subheader. The Semantic-UI Content component is important like without the header/summary the content finding procedure will kill lots of times. In this article, we will now about Image Content.

Semantic UI Header Image Content Class:

  • image: This class is used to include the image in the header.

Syntax: Image shape and size can be manipulated

<img class="ui image" src="...">

Below examples illustrate the Semantic UI Header Image Content:

Example 1: In this example, we will attach an image as header content in a circle shape.

HTML
<!DOCTYPE html>
<html>

<head>
   <title>Semantic UI</title>
   <link href=
"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"
         rel="stylesheet" />
</head>

<body>
<center>
    <h1 class="ui header green">
    GeeksforGeeks
    </h1>
    <strong>
    Semantic-UI Header Image Content
    </strong>
</center>
<br>
<div class="ui segment">
    <strong class="ui header">
    Geeksforgeeks:
    </strong>
    <img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20220119210822/GFG-100x100.jpg"
        class="ui circular image">
    <p>
        Free Tutorials, Millions of Articles, Live,
        Online and Classroom Courses ,Frequent Coding
        Competitions ,Webinars by Industry Experts,
        Internship opportunities and Job Opportunities.
    </p>

</div>
</body>

</html>

Output:

Semantic UI Header Image Content
Semantic UI Header Image Content

Example 2: In this example, we will attach an image as header content in a square shape.

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Semantic UI</title>
    <link href=
"https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css"
          rel="stylesheet" />
</head>

<body>
<center>
    <h1 class="ui header green">
    GeeksforGeeks
    </h1>
    <strong>
    Semantic-UI Header Image Content
    </strong>
</center>
<br>
<div class="ui segment">
    <strong class="ui header">
    Geeksforgeeks:
    </strong>
    <img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20220119210822/GFG-100x100.jpg"
         class="ui image">
    <p>
        Free Tutorials, Millions of Articles, Live,
        Online and Classroom Courses ,Frequent Coding
        Competitions ,Webinars by Industry Experts,
        Internship opportunities and Job Opportunities.
    </p>

</div>
</body>

</html>

Output:

Semantic UI Header Image Content
Semantic UI Header Image Content

Reference: https://semantic-ui.com/elements/header.html#image


Next Article

Similar Reads