HTML <script> Tag

Example Write “Hello JavaScript!” with JavaScript: <script> document.getElementById(“demo”).innerHTML = “Hello JavaScript!”; </script> Try it Yourself » Definition and Usage The <script> tag is used to define a client-side script (JavaScript). The <script> element either contains scripting statements, or it points to an external script file through the src attribute. Common uses for JavaScript are image manipulation, form […]

HTML <noscript> Tag

Example Use of the <noscript> tag: <script> document.write(“Hello World!”) </script> <noscript>Your browser does not support JavaScript!</noscript> Try it Yourself » Definition and Usage The <noscript> tag defines an alternate content for users that have disabled scripts in their browser or have a browser that doesn’t support script. The <noscript> element can be used in both […]

HTML <tfoot> valign Attribute

Example Vertical align the content inside the <tfoot> element to the bottom: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> <tfoot valign=”bottom”> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> </table> Try it Yourself » Definition and Usage The valign attribute specifies the vertical alignment of the content in a <tfoot> element. Browser Support […]

HTML <tfoot> char Attribute

Example Align the content inside the <tfoot> element to the “.” character: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> <tfoot align=”char” char=”.”> <tr> <td>Sum</td> <td>$180.00</td> </tr> </tfoot> </table> Try it Yourself » Definition and Usage The <tfoot> char attribute is not supported in HTML5. The char attribute specifies the alignment of […]

HTML <tfoot> charoff Attribute

Example Align the content inside the <tfoot> element two characters to the right from the “.” character: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> <tfoot align=”char” char=”.” charoff=”2″> <tr> <td>Sum</td> <td>$180.00</td> </tr> </tfoot> </table> Try it Yourself » Definition and Usage The <tfoot> charoff attribute is not supported in HTML5. The charoff […]

HTML <tfoot> align Attribute

Example Center-align the content inside the <tfoot> element: <table> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> <tfoot align=”center”> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> </table> Try it Yourself » Definition and Usage The align attribute specifies the horizontal alignment of the content inside the <tfoot> element. Browser Support Attribute align Yes Yes […]

HTML <frameset> Tag

Not Supported in HTML5 Example A simple three-framed page: <frameset cols=”25%,*,25%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> <frame src=”frame_c.htm”> </frameset> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <frameset> tag is not supported in HTML5. The <frameset> tag defines a frameset. The <frameset> element holds one or more <frame> elements. Each <frame> element can hold a separate […]

HTML <frame> frameborder Attribute

Example A two-framed page, with no frameborders: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” frameborder=”0″> <frame src=”frame_b.htm” frameborder=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The frameborder attribute specifies whether or not to display a border around a frame. Tip: For practical reasons, it may be better not to specify borders, and use CSS to […]

HTML <frame> Tag

Not Supported in HTML5 Example A simple three-framed page: <frameset cols=”25%,50%,25%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <frame> tag is not supported in HTML5. The <frame> tag defines one particular window (frame) within a <frameset>. Each <frame> in a <frameset> can have different attributes, such […]

HTML <frame> src Attribute

Example The src attribute specifies the location of the document to show in a <frame>: <frameset cols=”50%,50%”> <frame src=”frame_a.htm”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The src attribute specifies the URL of the document to show in a frame. Browser Support Attribute src Yes Yes Yes […]

HTML <frame> name Attribute

Example A named frame: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” name=”frame_a”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The name attribute specifies the name of a <frame> element. The name attribute is used to reference the element in a JavaScript, or to act as a target for a link. Browser […]

HTML <frame> scrolling Attribute

Example Frame A should always have scrollbars: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” scrolling=”yes”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The scrolling attribute specifies whether or not to display scrollbars in a <frame>. By default, scrollbars appear in a <frame> if the content is larger than the <frame>. Browser […]

HTML <frame> noresize Attribute

Example Frame A cannot be resized: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” noresize=”noresize”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The noresize attribute specifies that a <frame> element cannot be resized by the user. By default, each <frame> in a <frameset> can be resized by dragging the border between the […]

HTML <frame> marginwidth Attribute

Example The first frame with a left and right margin of 50 pixels, and the second frame with a left and right margin of 0 pixels: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” marginwidth=”50″> <frame src=”frame_b.htm” marginwidth=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The marginwidth attribute specifies the width between the content and […]

HTML <frame> longdesc Attribute

Example The longdesc attribute points to a page with a long description of the content of a frame: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” longdesc=”dw.txt”> <frame src=”frame_b.htm”> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The longdesc attribute specifies a URL to a page that contains a long description of the content of […]

HTML <frame> marginheight Attribute

Example The first frame with a top and bottom margin of 50 pixels, and the second frame with a top and bottom margin of 0 pixels: <frameset cols=”50%,50%”> <frame src=”frame_a.htm” marginheight=”50″> <frame src=”frame_b.htm” marginheight=”0″> </frameset> Try it Yourself » Definition and Usage The <frame> tag is not supported in HTML5. The marginheight attribute specifies the height between the content and […]

HTML <form> Tag

Example An HTML form with two input fields and one submit button: <form action=”/action_page.php” method=”get”> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » More “Try it Yourself” examples below. Definition and Usage The <form> tag is used to create an HTML form for user input. The <form> element can contain one or more of the […]

HTML <form> autocomplete Attribute

Example A form with autocomplete on: <form action=”/action_page.php” method=”get” autocomplete=”on”> First name:<input type=”text” name=”fname”><br> E-mail: <input type=”email” name=”email”><br> <input type=”submit”> </form> Try it Yourself » Definition and Usage The autocomplete attribute specifies whether a form should have autocomplete on or off. When autocomplete is on, the browser automatically complete values based on values that the user has entered before. Tip: It is possible to have […]

HTML <form> name Attribute

Example An HTML form with a name attribute: <form action=”/action_page.php” method=”get” name=”myForm”> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> <input type=”button” onclick=”formSubmit()” value=”Send form data!”> </form> Try it Yourself » Definition and Usage The name attribute specifies the name of a form. The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted. Browser […]

HTML <form> accept-charset Attribute

Example A form with an accept-charset attribute: <form action=”/action_page.php” accept-charset=”ISO-8859-1″> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> <input type=”submit” value=”Submit”> </form> Try it Yourself » Definition and Usage The accept-charset attribute specifies the character encodings that are to be used for the form submission. The default value is the reserved string “UNKNOWN” (indicates that the encoding equals the encoding of the document […]