Skip to content

Attribute error in the challenge result "Creepy-crawly splash page" #42473

@tristantheb

Description

@tristantheb

MDN URL

https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/Splash_page

What specific section or headline is this issue about?

https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/Splash_page#example

What information was incorrect, unhelpful, or incomplete?

This follows a question from Discord, which was raised by a user who challenged that the exercise contained the solution in the presence of the type attribute in the <video> element.

<video
  src="https://mdn.github.io/shared-assets/videos/learn/bug_video_640.mp4"
! type="video/mp4"
  autoplay
  loop
  muted
  preload="auto"></video>

However, this attribute can only be used in a <source> element encapsulated in the <video> element to be useful; otherwise, it does not work and serves no purpose. The user noticed the error because W3C validation flagged it.


Same thing here: https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Structuring_content/Splash_page#adding_a_video_to_the_header

- Specify the [media type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types) of the video.

Should we revise the first point on the list so as not to say that it is necessary to specify a type except when there are several different sources, so that the browser can use the video codec it recognizes? Or should we simply remove the line.

What did you expect to see?

Since this attribute is not useful, there is no need to keep it in the result, so as not to interfere with learning best practices and not to show an incorrect example.

<video
  src="https://mdn.github.io/shared-assets/videos/learn/bug_video_640.mp4"
- type="video/mp4"
  autoplay
  loop
  muted
  preload="auto"></video>

Or, if it is important, then show the usage with the <source> element, which will allow the correct display of the type attribute to be shown?

Do you have any supporting links, references, or citations?

none

Do you have anything more you want to share?

none

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:LearnLearning area docsgood first issueA good issue for newcomers to get started with.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions