HTML5 New Elements

New Elements in HTML5 Below is a list of the new HTML5 elements, and a description of what they are used for. New Semantic/Structural Elements HTML5 offers new elements for better document structure: Tag Description <article> Defines an article <aside> Defines content aside from the page content <audio> Defines sound content <bdi> Isolates a part […]

HTML5 Introduction

What is New in HTML5? The DOCTYPE declaration for HTML5 is very simple: <!DOCTYPE html> The character encoding (charset) declaration is also very simple: <meta charset=”UTF-8″> HTML5 Example: <!DOCTYPE html> <html> <head> <meta charset=”UTF-8″> <title>Title of the document</title> </head><body> Content of the document…… </body></html> Try it Yourself » The default character encoding in HTML5 is UTF-8. New HTML5 Elements […]

HTML <track> label Attribute

Example A video with two subtitle tracks, both with a label defined: <video width=”320″ height=”240″ controls> <source src=”forrest_gump.mp4″ type=”video/mp4″>  <track src=”subtitles_en.vtt” kind=”subtitles” srclang=”en” label=”English”> <track src=”subtitles_no.vtt” kind=”subtitles” srclang=”no” label=”Norwegian”> </video> Definition and Usage The label attribute specifies the title of the text track. The title of the text track is used by the browser when listing available text tracks. Browser Support The numbers in the table specify the […]

HTML <track> default Attribute

Example A video with two subtitle tracks. “English” subtitle is the default: <video width=”320″ height=”240″ controls> <source src=”forrest.mp4″ type=”video/mp4″>  <track src=”subtitles_en.vtt” kind=”subtitles” srclang=”en” label=”English” default> <track src=”subtitles_no.vtt” kind=”subtitles” srclang=”no” label=”Norwegian”> </video> Definition and Usage The default attribute is a boolean attribute. When present, it specifies that the track is to be enabled if the user’s preferences do not indicate that another track would be more appropriate. Note: There must not […]

HTML <track> Tag

Example A video with two subtitle tracks: <video width=”320″ height=”240″ controls> <source src=”forrest.mp4″ type=”video/mp4″>  <track src=”subtitles_en.vtt” kind=”subtitles” srclang=”en” label=”English”> <track src=”subtitles_no.vtt” kind=”subtitles” srclang=”no” label=”Norwegian”> </video> Definition and Usage The <track> tag specifies text tracks for media elements (<audio> and <video>). This element is used to specify subtitles, caption files or other files containing text, that should be visible when the media is playing. Browser Support The numbers in […]

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 <aside> Tag

Example <p>My family and I visited The Epcot center this summer.</p> <aside> <h4>Epcot Center</h4> <p>The Epcot Center is a theme park in Disney World, Florida.</p> </aside> Try it Yourself » Definition and Usage The <aside> tag defines some content aside from the content it is placed in. The aside content should be related to the […]

HTML Symbols

HTML Symbol Entities HTML entities were described in the previous chapter. Many mathematical, technical, and currency symbols, are not present on a normal keyboard. To add such symbols to an HTML page, you can use an HTML entity name. If no entity name exists, you can use an entity number, a decimal, or hexadecimal reference. […]