Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:31:08+00:00 2026-05-13T10:31:08+00:00

Is there any defined behaviour if I have an HTML5 VIDEO tag but include

  • 0

Is there any defined behaviour if I have an HTML5 VIDEO tag but include neither a SRC attribute nor SOURCE tags inside the element? Would this still be valid HTML, and if so, what should the (HTML5 capable) browser do – ignore the element or display it’s contents?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:31:09+00:00Added an answer on May 13, 2026 at 10:31 am

    Yes, there is defined behavior; HTML5 is trying to provide defined behavior for any case in which it could make a difference between browsers, to reduce incompatibility, even when dealing with invalid documents.

    From my reading of the spec, it looks like it is invalid to have no src attribute or source element:

    Content model:
    If the
    element has a src attribute:
    transparent, but with no media element
    descendants.
    If the element does not
    have a src attribute: one or more
    source elements, then, transparent,
    but with no media element
    descendants.

    This seems to indicate to me that it must have either a src attribute or a source child element. But both the Validator.nu and the W3C Validator seem to think this is a valid document:

    <!DOCTYPE html>
    <title>Video test</title>
    <video></video>
    

    Regardless of whether it’s valid, the behavior is defined in the resource selection algorithm as follows:

    ⌛ Otherwise the media element has
    neither a src attribute nor a source
    element child: set the networkState to
    NETWORK_EMPTY, and abort these steps;
    the synchronous section ends.

    This implies a ready state of HAVE_NOTHING

    HAVE_NOTHING (numeric value 0)
    No information regarding the media
    resource is available. No data for the
    current playback position is
    available. Media elements whose
    networkState attribute is
    NETWORK_EMPTY are always in the
    HAVE_NOTHING state.

    In that state, the video is represented by its poster frame, or nothing:

    When no video data is available (the
    element’s readyState attribute is
    either HAVE_NOTHING, or
    HAVE_METADATA but no video data has
    yet been obtained at all), the video
    element represents either the poster
    frame, or nothing.

    When it’s represented by nothing, that means it appears as just a generic box; like a div, that can be styled but has no intrinsic display of its own, though it will be the width and height specified by its width and height attributes. For example:

    <!DOCTYPE html>
    <video width=100 height=100 
           style="border-width: 1px; border-color:black; border-style: solid; 
                  background: green">
    foobar
    </video>
    

    Note that it does not display its content, in browsers that support the video tag. Content within the video tag, other than the source elements, is intended to be fallback content displayed only by older browsers that don’t support the video element:

    Content may be provided inside the
    video element. User agents should not
    show this content to the user; it is
    intended for older Web browsers which
    do not support video, so that legacy
    video plugins can be tried, or to show
    text to the users of these older
    browsers informing them of how to
    access the video contents.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any explanation of this strange behavior of defined constant? I have 1
Is there any method / API defined to collect system info in osx. I
If yes is there any way to access a var defined in another PHP
In a large Application is there any way to distinguish user-defined classes with built-in
WinJS.UI.getControl is not defined in VS 11 Ultimate. Is there any alternatives there to
I would like to know if there is any way to add custom behaviour
Is there any issue with partially overriding a set of virtual functions defined by
I was wondering if there are any source control systems that allow administrators to
is there any way to define objects in hibernate.cfg.xml by scope and not one
Is there any way to define a variable that can be used in multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.