HTML <video> src Attribute

Example Play a video: <video src=”movie.ogg” controls> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The src attribute specifies the location (URL) of the video file. The example above uses an Ogg file, and will work in Firefox, Opera and Chrome. To play the video in Internet Explorer and […]

HTML <video> preload Attribute

Example Author thinks that the video should NOT be loaded when the page loads: <video controls preload=”none”> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The preload attribute specifies if and how the author thinks that the video should be loaded when the page loads. The preload […]

HTML <video> poster Attribute

Example A video player with a poster image: <video controls poster=”/images/w3html5.gif”> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The poster attribute specifies an image to be shown while the video is downloading, or until the user hits the play button. If this is not included, the […]

HTML <video> muted Attribute

Example A muted video: <video controls muted> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The muted attribute is a boolean attribute. When present, it specifies that the audio output of the video should be muted. Browser Support The numbers in the table specify the first browser […]

HTML <video> loop Attribute

Example A video that will start over again, every time it is finished: <video controls loop> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The loop attribute is a boolean attribute. When present, it specifies that the video will start over again, every time it is finished. […]

HTML <video> height Attribute

Example A video player with a specified height and width: <video width=”320″ height=”240″ controls> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The height attribute specifies the height of a video player, in pixels. Tip: Always specify both the height and width attributes for videos. If height and width are […]

HTML <video> controls Attribute

Example A <video> element with browser default controls: <video controls> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The controls attribute is a boolean attribute. When present, it specifies that video controls should be displayed. Video controls should include: Play Pause Seeking Volume Fullscreen toggle Captions/Subtitles (when […]

HTML <video> autoplay Attribute

Example A video that will automatically start playing: <video controls autoplay> <source src=”movie.mp4″ type=”video/mp4″> Your browser does not support the video tag. </video> Try it Yourself » Definition and Usage The autoplay attribute is a boolean attribute. When present, the video will automatically start playing as soon as it can do so without stopping. Browser Support The numbers […]

HTML <wbr> Tag

Example A text with word break opportunities: <p> To learn AJAX, you must be familiar with the XML<wbr>Http<wbr>Request Object. </p> Try it Yourself » Definition and Usage The <wbr> (Word Break Opportunity) tag specifies where in a text it would be ok to add a line-break. Tip: When a word is too long, or you are […]

HTML <div> Tag

Example A section in a document that will have a light blue background color: <div style=”background-color:lightblue”> <h3>This is a heading</h3> <p>This is a paragraph.</p> </div> Try it Yourself » Definition and Usage The <div> tag defines a division or a section in an HTML document. The <div> element is often used as a container for other […]

HTML <ul> Tag

Example An unordered HTML list: <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <ul> tag defines an unordered (bulleted) list. Use the <ul> tag together with the <li> tag to create unordered lists. Browser Support Element <ul> Yes Yes Yes Yes Yes Tips and Notes Tip: Use […]

HTML <dir> Tag

Not Supported in HTML5 Example A directory list: <dir> <li>html</li> <li>xhtml</li> <li>css</li> </dir> Try it Yourself » Definition and Usage The <dir> tag is not supported in HTML5. Use <ul> or CSS instead. The <dir> tag is used to list directory titles. Browser Support Element <dir> Yes Yes Yes Yes Yes Tips and Notes Tip: Use CSS to […]

HTML <dialog> Tag

Example Using the <dialog> element: <table> <tr> <th>January <dialog open>This is an open dialog window</dialog></th> <th>February</th> <th>March</th> </tr> <tr> <td>31</td> <td>28</td> <td>31</td> </tr> </table> Try it Yourself » Definition and Usage The <dialog> tag defines a dialog box or window. The <dialog> element makes it easy to create popup dialogs and modals on a web page. Browser […]

HTML <dfn> Tag

Example Mark up the defining instance of a term: <p><dfn>HTML</dfn> is the standard markup language for creating web pages.</p> Try it Yourself » Definition and Usage The <dfn> tag represents the defining instance of a term in HTML. The defining instance is often the first use of a term in a document. The nearest parent of […]

HTML <details> Tag

Example Using the <details> element: <details> <summary>Copyright 1999-2018.</summary> <p> – by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </details> Try it Yourself » Definition and Usage The <details> tag specifies additional details that the user can view or hide on demand. The […]

HTML <ins> Tag

Example A text with a deleted part, and a new, inserted part: <p>My favorite color is <del>blue</del> <ins>red</ins>!</p> Try it Yourself » Definition and Usage The <ins> tag defines a text that has been inserted into a document. Tip: Also look at the <del> tag to markup deleted text. Browsers will normally strike a line through deleted text and underline […]

HTML <del> Tag

Example A text with a deleted part, and a new, inserted part: <p>My favorite color is <del>blue</del> <ins>red</ins>!</p> Try it Yourself » Definition and Usage The <del> tag defines text that has been deleted from a document. Browser Support Element <del> Yes Yes Yes Yes Yes Tips and Notes Tip: Also look at the <ins> tag to markup inserted text. […]

HTML <dd> Tag

Example A description list, with terms and descriptions: <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> Try it Yourself » Definition and Usage The <dd> tag is used to describe a term/name in a description list. The <dd> tag is used in conjunction with <dl> (defines a description list) and <dt> (defines terms/names). Inside a <dd> tag […]

HTML <dt> Tag

Example A description list, with terms and descriptions: <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> Try it Yourself » Definition and Usage The <dt> tag defines a term/name in a description list. The <dt> tag is used in conjunction with <dl> (defines a description list) and <dd> (describes each term/name). Browser Support Element <dt> Yes Yes […]