HTML <base> Tag

Example Specify a default URL and a default target for all links on a page: <head> <base href=”https://www.schools.com/images/” target=”_blank”> </head><body> <img src=”stickman.gif” width=”24″ height=”39″ alt=”Stickman”> <a href=”https://www.schools.com”>Schools</a> </body> Try it Yourself » Definition and Usage The <base> tag specifies the base URL/target for all relative URLs in a document. There can be at maximum one <base> element in a document, and it […]

HTML <base> target Attribute

Example Specify a default target for all hyperlinks and forms on a page: <head> <base target=”_blank”> </head> Try it Yourself » Definition and Usage The target attribute specifies the default target for all hyperlinks and forms in the page. This attribute can be overridden by using the target attribute for each hyperlink/form. Browser Support Attribute target […]

HTML <base> href Attribute

Example Specify a base URL for all relative URLs on a page: <head> <base href=”https://www.schools.com/images/”> </head> Try it Yourself » Definition and Usage The href attribute specifies the base URL for all relative URLs on a page. Browser Support Attribute href Yes Yes Yes Yes Yes Syntax <base href=”URL“> Attribute Values Value Description URL An absolute […]

HTML <mark> Tag

Example Highlight parts of a text: <p>Do not forget to buy <mark>milk</mark> today.</p> Try it Yourself » Definition and Usage The <mark> tag defines marked text. Use the <mark> tag if you want to highlight parts of your text. Browser Support The numbers in the table specify the first browser version that fully supports the element. Element […]

HTML <strong> Tag

Example Format text in a document: <strong>Strong text</strong> Try it Yourself » Definition and Usage The <strong> tag is a phrase tag. It defines important text. Tip: This tag is not deprecated, but it is possible to achieve richer effect with CSS. All phrase tags: Tag Description <em> Renders as emphasized text <strong> Defines important text […]

HTML <em> Tag

Example Format text in a document: <em>Emphasized text</em> Try it Yourself » Definition and Usage The <em> tag is a phrase tag. It renders as emphasized text. Tip: This tag is not deprecated, but it is possible to achieve richer effect with CSS. All phrase tags: Tag Description <em> Renders as emphasized text <strong> Defines important […]

HTML <h1> to <h6> Tags

Example The six different HTML headings: <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> Try it Yourself » Definition and Usage The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading. <h6> […]

HTML <b> Tag

Example <p>This is normal text – <b>and this is bold text</b>.</p> Try it Yourself » Definition and Usage The <b> tag specifies bold text. Browser Support Element <b> Yes Yes Yes Yes Yes Differences Between HTML 4.01 and HTML5 NONE. Tips and Notes Note: According to the HTML 5 specification, the <b> tag should be used as […]

HTML <audio> Tag

Example Play a sound: <audio controls> <source src=”Wild_Pogo.mp3″ type=”audio/mpeg”> Your browser does not support the audio tag. </audio> Try it Yourself » Definition and Usage The <audio> tag defines sound, such as music or other audio streams. Currently, there are 3 supported file formats for the <audio> element: MP3, WAV, and OGG: Browser MP3 WAV OGG Internet Explorer […]

HTML <audio> src Attribute

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

HTML <source> Tag

Example An audio player with two source files. The browser should choose which file (if any) it has support for: <audio controls> <source src=”horse.ogg” type=”audio/ogg”> <source src=”horse.mp3″ type=”audio/mpeg”> Your browser does not support the audio element. </audio> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <source> tag is used to specify multiple media resources […]

HTML <audio> preload Attribute

Example Author thinks that the sound should NOT be loaded when the page loads: <audio controls preload=”none”> <source src=”https://dwfaisalabad.com/downloads/Wild_Pogo.mp3″ type=”audio/mpeg”> Your browser does not support the audio element. </audio> Try it Yourself » Definition and Usage The preload attribute specifies if and how the author thinks that the audio file should be loaded when the page […]

HTML <audio> muted Attribute

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

HTML <audio> loop Attribute

Example A song that will start over again, every time it is finished: <audio controls loop> <source src=”https://dwfaisalabad.com/downloads/Wild_Pogo.mp3″ type=”audio/mpeg”> Your browser does not support the audio element. </audio> Try it Yourself » Definition and Usage The loop attribute is a boolean attribute. When present, it specifies that the audio will start over again, every time it […]

HTML <audio> controls Attribute

Example An <audio> element with browser default controls: <audio controls> <source src=”horse.mp3″ type=”audio/mpeg”> Your browser does not support the audio element. </audio> Try it Yourself » Definition and Usage The controls attribute is a boolean attribute. When present, it specifies that audio controls should be displayed. Audio controls should include: Play Pause Seeking Volume Browser Support The numbers […]

HTML <audio> autoplay Attribute

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

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 <area> type Attribute

Example The type attribute specifies the media type of the target URL: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ alt=”Sun” href=”/images/sun.gif” type=”image/gif”> </map> Try it Yourself » Definition and Usage The type attribute specifies the Internet media type (formerly known as MIME type) of the target URL. This attribute is only used if the href attribute is set. Note: This attribute is […]

HTML <area> target Attribute

Example An image-map, with clickable areas, and a target attribute: <img src=”planets.gif” width=”145″ height=”126″ alt=”Planets” usemap=”#planetmap”> <map name=”planetmap”> <area shape=”rect” coords=”0,0,82,126″ href=”sun.htm” alt=”Sun” target=”_blank”> <area shape=”circle” coords=”90,58,3″ href=”mercur.htm” alt=”Mercury”> <area shape=”circle” coords=”124,58,8″ href=”venus.htm” alt=”Venus”> </map> Try it Yourself » Definition and Usage The target attribute specifies where to open the linked document. Only used if the href attribute is present. Browser Support Attribute target Yes Yes Yes Yes Yes Differences Between HTML […]