What is the proper way to display a logo with CSS

0 votes
I've recently started learning CSS, and according to the tutorial series I'm watching, the ideal approach to display a logo image is to wrap the text in an H1 element, then set the CSS style for that tag to the background image, with a text-indent of -99999 or some large number.

This appears to be extremely clumsy and inelegant. It also appears that utilizing CSS to obscure text is a big no-no in terms of SEO (as hiding text via CSS is frowned upon).

I've also read that utilizing an image should be avoided because the logo isn't truly content and should be confined to the coding's design side (i.e. CSS).

What is the present state of opinion on this?
Jun 2, 2022 in CSS by Edureka
• 13,620 points
764 views

1 answer to this question.

0 votes
An <img> element is the proper way to show a logo. If you haven't studied logos and logotypes, you may be unaware that a logo has its own semantics and must be presented in a precise way. It may also have a necessary meaning, which should be specified in the [alt] attribute.

If the needed interpretation is a genuine heading on the page, adding it to a < h#> element is semantically correct.
answered Jun 10, 2022 by Edureka
• 12,690 points

Related Questions In CSS

0 votes
0 answers

Is there a way to link in a stylesheet where the extension is not .css?

When I dynamically connect in the CSS ...READ MORE

Aug 8, 2022 in CSS by Edureka
• 13,620 points
1,220 views
0 votes
0 answers
0 votes
1 answer

Is there any way to animate an ellipsis with CSS animations?

You might try to time each ellipsis ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
1,245 views
0 votes
1 answer

CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page

A simple solution is to make the ...READ MORE

answered Jun 21, 2022 in CSS by Edureka
• 12,690 points
4,269 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,605 views
0 votes
1 answer

Using/Handling colon inside a JSF generated HTML element ID in CSS selector

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,250 points
2,882 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 52,350 points
960 views
0 votes
1 answer

Is there any way to colorize a white PNG image with CSS only?

Filters can be used with -webkit-filter and ...READ MORE

answered May 27, 2022 in CSS by Edureka
• 12,690 points
1,974 views
0 votes
1 answer

when declaring css styles, what is the meaning of .classA.classB (two class names with a dot in the middle and no space)

The first example (space-separated classes) is a ...READ MORE

answered Jun 28, 2022 in CSS by Edureka
• 12,690 points
765 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP