How to fix W3C warns of website

Hi, I’m new here, and recently my website occurs many problems which I didn’t found before. And one of them is W3C warning, but I don’t know what specific error it is. Does anyone know more about W3C and solutions about solving it?
If necessary, I will post my website url.

Yeah, that would be helpful.

1 Like

I assume the warning was something to the effect of a failure to pass W3C Validation, so… probably step 1 is going to be run the validation and see what it says?

1 Like

Thanks. https://www.smbom.com/ This is my website url.

Yes, you’re right, but where could I run the validation and see the results?

The HTML validator is here: https://validator.w3.org/

1 Like

Thanks a lot!

It’s a Nuxt site, right?

We assumed you already had that as you said there were W3C errors, :wink:

Yeah, it shows like that

You might like to look at this: https://html-validator.nuxtjs.org/

Yes, through the website you provide for me, after checking, it shows so many errors, and most of them are CSS or element, but among them, I found one warning and I just copy as follow, what should I do to fix this warning? Becasue I thinks warning is more serious than errors. :cry:

  1. Warning: label element with multiple labelable descendants.From line 3685, column 19094; to line 3685, column 19268-b44fffd0><label class="block w-full h-120px rounded-6px border-1px border-dashed border-white overflow-hidden cursor-pointer flex flex-col justify-center items-center" data-v-b44fffd0><div c

Thanks! Is this the result of my website after checking? Because I didn’t find the way to check the url.

You can use that module (follow the instructions to install it) to validate Nuxt server-rendered HTML (SSR and SSG) and detect common issues with HTML that can lead to hydration errors, as well as improve accessibility and best practice.

Saying that, browsers are very forgiving and lots of websites don’t validate. For example, here’s what happens when you validate the SitePoint forums: https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.sitepoint.com%2Fcommunity%2F

Are you having a particular problem which would point to a W3 validation error?

1 Like

Thanks again!
I have checked my website url from it, it mainly shows CSS, attribute something and elements errors, as well as a warning which I already pasted as above.
However, what I can fix by myself is just this: < meta name=“og:image” >
Anyway, will these errors affect Google’s indexed?

I would say no, but if anyone has any evidence to the contrary, please correct me.

See here:

A label is an inline element and cannot have block descendants like a div. Inline elements can only contain other inline elements like spans etc. Change the div to a span and if necessary you can change its CSS display property as required

Great, thanks a lot!!!

I got it, thanks for your help, but maybe I will not correct it because it seems to be not affect Google’s indexed.

For me this sounds like „I will not remove the nail out of my tire as the tire is not loosing air by now“

1 Like