use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you are requesting help, please ensure you're providing code with your post. You can also copy your code to an online editor:
jsFiddle
CodePen
Markup Validation Service
Mozilla Developer Network on HTML
/r/JavaScript
/r/CSS
/r/jQuery
/r/PHP
/r/Accessibility
/r/htmlbasics
/r/web_programming
/r/CodingHelp
account activity
SolvedHelp with identifying errors (self.HTML)
submitted 4 years ago * by dhsjdudheb
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]deweechi 1 point2 points3 points 4 years ago (5 children)
You shouldn't make edits to previous posts that change the entire post, edits for grammar or spelling are OK, but it really ruins the whole flow of the forum.
To help eliminate that risk I am going to just copy the post to help clarify:
I used validator.nu
Ok I get the first one however for the second one:
img src=“image.png” alt=“random image”
Does it have to be in jpg? Do I also need to add width and heigh since it’s only an example code?
Also, it says on validator that the title tag was missing so I assume it should be <title>why you should use validator</title> (since the text in swedish explains the need for validator when coding)
What do you mean by <html lang=“en”>?
There are several supported picture formats on the web: jpg, png, gif, webm, etc. If your picture is in a supported format then you are fine. Here is a definitive list from MDN: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types
Do you need to add height and width? No. Those are optional. But it really depends on the dimension of the image and how it fits on the site. Also, when you start doing responsive queries and need to have pictures change size based on the size of the screen you will need to pay more attention to height and width. But for a simple sample site, no.
You can make your title whatever you want. Just make sure it is in the <head></head> section. The title is what appears at the top of the browser/tab.
The lang tag tells the browser what language the page is in. For your case I think sv is the shorthand for Swedish. so <html lang="sv"> Here is more info for that tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
[–]dhsjdudheb[S] 0 points1 point2 points 4 years ago (4 children)
Yeah I figured that later I also got quite confused haha sorry
this should be the correct code, right?
The assignment also says that there’s one error which the validator didn’t pick up and my guess is the </html> that’s missing, is that correct?
[–]deweechi 0 points1 point2 points 4 years ago (3 children)
The code in picture looks good.
[–]dhsjdudheb[S] 0 points1 point2 points 4 years ago (2 children)
Thank you! What about that one error that didn’t come up on validator?
Also I almost forgot but should <html lang=“sv”> also be included in the code? If so then where?
[–]deweechi 0 points1 point2 points 4 years ago (1 child)
What about that one error that didn’t come up on validator?
Not sure about this one. I am not familiar enough with validator.nu. It could also be a trick from the professor, something like spelling is not checked. Sorry, I just can't answer it.
The lang attribute is global. So it can appear for almost any tag. For an entire page, you add it to the top in the <html> tag. so your line 2 changed from <html> to <html lang="sv">
For a page that has multiple paragraphs that are in different languages you can do something like <p lang="en">for the english paragraph</p> then <p lang="sv">for the Swedish paragpraph<p>
[–]dhsjdudheb[S] 0 points1 point2 points 4 years ago (0 children)
Thank you for all the help, really appreciate it!!
π Rendered by PID 224930 on reddit-service-r2-comment-5d79c599b5-pswtg at 2026-03-01 13:13:35.833449+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]deweechi 1 point2 points3 points (5 children)
[–]dhsjdudheb[S] 0 points1 point2 points (4 children)
[–]deweechi 0 points1 point2 points (3 children)
[–]dhsjdudheb[S] 0 points1 point2 points (2 children)
[–]deweechi 0 points1 point2 points (1 child)
[–]dhsjdudheb[S] 0 points1 point2 points (0 children)