HTML srclang Attribute

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 srclang attribute specifies the language of the track text data. This attribute is required if kind=”subtitles”. Tip: To view all available language codes, go to our Language code reference. Browser Support The numbers in the table specify the first browser version […]

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 Layouts

HTML Layout Elements Websites often display content in multiple columns (like a magazine or newspaper). HTML5 offers new semantic elements that define the different parts of a web page: <header> – Defines a header for a document or a section <nav> – Defines a container for navigation links <section> – Defines a section in a […]

HTML Colors

HTML colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values. Color Names In HTML, a color can be specified by using a color name: Try it Yourself » Background Color You can set the background color for HTML elements: Example <h1 style=”background-color:DodgerBlue;”>Hello World</h1> <p style=”background-color:Tomato;”>Lorem ipsum…</p> Try it Yourself » Text Color […]