Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

ALT Tag for header image (hero_image)

admin first-time

Solved by pamtbaau View solution

Started by will 6 months ago · 3 replies · 83 views
6 months ago

Hello, I figured out to tag images. But I don’t know how to tag a hero_image, the image in the header. Diagnose shows to me, that one image is without alt.
Would be great to get support.

6 months ago

I installed the Blog Site Skeleton, updated it to 1.7.49.5., with Quark Theme 2.0.0. The plugins I use are those shipped by the installation package.
There are no program errors, but SEO analysis shows that the header image (hero_image) has no alt tag.
I hope these additional details are sufficient for you to answer my support request.

6 months ago Solution

@farf, In that case, the header image cannot have an alt attribute, because it is a background image. Only <img> elements can have an alt attribute.

HTML
<section id="blog-hero" 
    class="section modular-hero hero text-light title-h1h2 overlay-dark-gradient hero-large parallax " 
    style="background-image: url('/user/pages/01.blog/mountain.jpg');">
    <div class="image-overlay"></div>
    <section class="container grid-xl" style="text-align: center">
        <h1>My <strong>Grav</strong>tastic Blog</h1>
        <h2>the ramblings of a rambler</h2>
    </section>
    <i id="to-start" class="pulse fa fa-angle-down"></i>
</section>
👍 1

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 74 6 hours ago
General · by pamtbaau, 11 hours ago
1 47 11 hours ago
General · by Andy Miller, 23 hours ago
0 43 23 hours ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 39 5 days ago