Posts

Showing posts from April, 2019

iframe tag in html

The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document. <!DOCTYPE html> <html> <body> <iframe src="https://technisias.blogspot.com/">   <p>Your browser does not support iframes.</p> </iframe> </body> </html> Output:

iframe in html

The <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document. <!DOCTYPE html> <html> <body> <iframe src="https://technisias.blogspot.com/">   <p>Your browser does not support iframes.</p> </iframe> </body> </html> Output:

no frames tag in html

The <noframes> tag is not supported in HTML5. The <noframes> tag is a fallback tag for browsers that do not support frames. It can contain all the HTML elements that you can find inside the <body> element of a normal HTML page. The <noframes> element can be used to link to a non-frameset version of the web site or to display a message to users that frames are required. The <noframes> element goes inside the <frameset> element.  If you want to validate a page containing frames, be sure the <!DOCTYPE> is set to either "HTML Frameset DTD" or "XHTML Frameset DTD". <!DOCTYPE html> <html> <frameset cols="25%,50%,25%">   <frame src="frame_a.htm">   <frame src="frame_b.htm">   <frame src="frame_c.htm">   <noframes>Sorry, your browser does not handle frames!</noframes> </frameset> </html> Output:...

frameset tag in html

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 document. The <frameset> element specifies HOW MANY columns or rows there will be in the frameset, and HOW MUCH percentage/pixels of space will occupy each of them. Note:  If you want to validate a page containing frames, be sure the  <!DOCTYPE>  is set to either "HTML Frameset DTD" or "XHTML Frameset DTD". <!DOCTYPE html> <html> <frameset cols="25%,*,25%">   <frame src="frame_a.htm">   <frame src="frame_b.htm">   <frame src="frame_c.htm"> </frameset> </html>

base tag in html

Image
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 must be inside the <head> element. <!DOCTYPE html> <html> <head>   <base href=" https://technisias.blogspot.com/ " target="_blank"> </head> <body> <p><img src="stickman.gif" width="24" height="39" alt="Stickman"> - Notice that we have only specified a relative address for the image. Since we have specified a base URL in the head section, the browser will look for the image at "https://www.w3schools.com/images/stickman.gif".</p> <p><a href=" https://technisias.blogspot.com/ ">technisia</a> - Notice that the link opens in a new window, even if it has no target="_blank" attribute. This is because the target attribute of the base element is ...

Area tag in html

Image
The <area> tag defines an area inside an image-map (an image-map is an image with clickable areas). The <area> element is always nested inside a <map> tag. The usemap attribute in the  <img>  tag is associated with the <map> element's name attribute, and creates a relationship between the image and the map. <!DOCTYPE html> <html> <body> <p>Click on the sun or on one of the planets to watch it closer:</p> <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">   <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">   <area shape="circle" coords="124,58,8" alt="Venus...

canvas tag in html

The <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> tag is only a container for graphics, you must use a script to actually draw the graphics. <!DOCTYPE html> <html> <body> <canvas id="myCanvas">Your browser does not support the HTML5 canvas tag.</canvas> <script> var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.fillStyle = "#FF0000"; ctx.fillRect(0, 0, 80, 100); </script> </body> </html>

input tag in html

The <form> tag is used to create an HTML form for user input. The <form> element can contain one or more of the following form elements: <input> <textarea> <button> <select> <option> <optgroup> <fieldset> <label> <!DOCTYPE html> <html> <body> <form action="/action_page.php"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> <input type="submit" value="Submit"> </form> <p>Click the "Submit" button and the form-data will be sent to a page on the server called "/action_page.php".</p> </body> </html> Output: First name:  Last name:  Click the "Submit" button and the form-data will be sent to ...

input tag in html and forms

The <input> tag specifies an input field where the user can enter data. <input> elements are used within a <form> element to declare input controls that allow users to input data. An input field can vary in many ways, depending on the type attribute. <!DOCTYPE html> <html> <body> <form action="/action_page.php"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> <input type="submit" value="Submit"> </form> <p>Click the "Submit" button and the form-data will be sent to a page on the server called "/action_page.php".</p> </body> </html> Output: First name:  Last name:  Click the "Submit" button and the form-data will be sent to a page on ...

labels in html

The <legend> tag defines a caption for the  <fieldset>  element. <!DOCTYPE html> <html> <body> <form>  <fieldset>   <legend>Personalia:</legend>   Name: <input type="text"><br>   Email: <input type="text"><br>   Date of birth: <input type="text">  </fieldset> </form> </body> </html> Output: Personalia: Name:  Email:  Date of birth: 

link tag in html or linking external style sheets to html

The <link> tag defines a link between a document and an external resource. The <link> tag is used to link to external style sheets. <!DOCTYPE html> <html> <head>   <link rel="stylesheet" type="text/css" href="styles.css"> </head> <body> <h1>I am formatted with a linked style sheet</h1> <p>Me too!</p> </body> </html> Output: I am formatted with a linked style sheet Me too!

script tag in html

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 validation, and dynamic changes of content. <!DOCTYPE html> <html> <body> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "Hello JavaScript!"; </script>  </body> </html> Output: Hello JavaScript!

noscript tag in html

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 <head> and <body>. When used inside the <head> element: <noscript> must contain only <link>, <style>, and <meta> elements. The content inside the <noscript> element will be displayed if scripts are not supported, or are disabled in the user's browser. <!DOCTYPE html> <html> <body> <script> document.write("Hello World!") </script> <noscript>Sorry, your browser does not support JavaScript!</noscript> <p>A browser without support for JavaScript will show the text inside the noscript element.</p> </body> </html> Output: Hello World!A browser without support for JavaScript will show the text inside the noscript el...