HTML Interview Questions
1 .
Explain the button tag with the help of code.
Button tag lets you create a clickable button in the HTML form on the webpage. 
 
<html>    
 <body>    
  <h2>HTML Button Tag Example</h2>    
  <button name="button" type="button">CLICK HERE</button>
 </body>    
</html>
2 .
Explain the script tag.
Script tag can be inside the head or body tag of the HTML code. This tag is executed when the browser reaches that part of the document.
  
<html>    
      <body>    
        <h2>HTML Script Tag Example</h2>    
        <script>
           var x = 5;
           var y = 6;
           var result = x + y;
         alert("X + Y is equal to " + result);                                                                                  
        </script> 
      </body>    
</html>
3 .
Why we use the Embed tag?
Embed Tag is used for including a Video or an Audio within an HTML Document. The Embed Tag requires a Closing Tag. It requires the Source of the Video or the Audio file that needs to be displayed onto the Page.

Syntax: <EMBED> Source File </EMBED>
4 .
Document Style Semantics And Specification Language (dsssl)?
Document Style Semantics and Specification Language is an international standard, an expression language, a styling language for associating processing (formatting and transformation) with SGML documents, for example XML.
5 .
Do Url's Have Quotes Or Not?
Double or single quotes in URLs are optional. The tree following examples are equally valid:
 
body {background: url(imgs/ftl_logo.png) blue}
body {background: url("imgs/ftl_logo.png") blue}
body {background: url('imgs/ftl_logo.png') blue}
6 .
What Is The Percentage Value In 'font-size' Relative To?
It is relative to the parent element's font-size. For example, if the style sheet says:
 
H1 {font-size: 20pt;}
SUP {font-size: 80%;}
7 .
Can I Attach More Than One Declaration To A Selector?
Yes. If more than one declaration is attached to a selector they must appear in a semi colon separated list, e.g.;
 
Selector {declaration1; declaration2}
P {background: white; color: black}
8 .
How Can I Include Comments In Html?
echnically, since HTML is an SGML application, HTML uses SGML comment syntax. However, the full syntax is complex, and browsers don't support it in its entirety anyway. Therefore, use the following simplified rule to create HTML comments that both have valid syntax and work in browsers:
 
An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment. 
The following are examples of HTML comments:
 
* <!-- This is a comment. -->
* <!-- This is another comment,
and it continues onto a second line. -->
* <!---->
9 .
How Can I Eliminate The Extra Space After A Tag?
HTML has no mechanism to control this. However, with CSS, you can set the margin-bottom of the form to 0.

For example : 
<form style="margin-bottom:0;" action=...>
 
You can also use a CSS style sheet to affect all the forms on a page:
form { margin-bottom: 0 ; }
10 .
How Do I Link An Image To Something?
Just use the image as the link content, like this:
 
<a href=...><img src=... alt=...></a>