HTML <embed> width Attribute

Example A flash animation with a height and width of 200 pixels: <embed src=”helloworld.swf” width=”200″ height=”200″> Try it Yourself » Definition and Usage The width attribute specifies the width of the embedded content, in pixels. Tip: Use the height attribute to specify the height of the embedded content. Browser Support Attribute width Yes Yes Yes Yes Yes Differences Between HTML 4.01 […]

HTML <video> width Attribute

Example A video player with a specified width and height: <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 width attribute specifies the width of a video player, in pixels. Tip: Always specify both the height and width attributes for videos. If height and width are […]

HTML <button> type Attribute

Example Two button elements that act as one submit button and one reset button (in a form): <form action=”/action_page.php” method=”get”> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> <button type=”submit” value=”Submit”>Submit</button> <button type=”reset” value=”Reset”>Reset</button> </form> Try it Yourself » Definition and Usage The type attribute specifies the type of button. Tip: Always specify the type attribute for the <button> element. Different browsers may use different default […]

HTML <button> value Attribute

Example Two buttons with equal names, that submit different values when clicked: <form action=”/action_page.php” method=”get”> Choose your favorite subject: <button name=”subject” type=”submit” value=”fav_HTML”>HTML</button> <button name=”subject” type=”submit” value=”fav_CSS”>CSS</button> </form> Try it Yourself » Definition and Usage The value attribute specifies the initial value for a <button> in a <form>. Note: In a form, the button and its value is only submitted if the button itself […]

HTML <basefont> size Attribute

Example Specify the default font-size for text on page: <head> <basefont size=”7″> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The size attribute specifies the default font-size for the text in a document. Browser Support Attribute size Not supported Not supported Not supported Not supported Not […]

HTML <basefont> face Attribute

Example Specify the default font for text on page: <head> <basefont face=”courier, serif”> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> Try it Yourself » Definition and Usage The face attribute specifies the default font for the text in a document. Browser Support Attribute face Not supported Not supported Not supported Not supported […]

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> media Attribute

Example An image-map, with a clickable area: <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=”sun.htm” media=”screen and (min-color-index:256)”> </map> Try it Yourself » Definition and Usage The media attribute specifies what media/device the target URL is optimized for. This attribute is used to specify that the URL is designed for special devices (like iPhone) , speech or print media. This […]

HTML <a> type Attribute

Example The type attribute specifies the media type of the linked document: <a href=”https://dwfaisalabad.com” type=”text/html”>dwfaisalabad</a> Try it Yourself » Definition and Usage The type attribute specifies the Internet media type (formerly known as MIME type) of the linked document. This attribute is only used if the href attribute is set. Note: This attribute is purely advisory. Differences Between […]