Showing posts with label HTML/HTML5 Interview Questions and Answers. Show all posts
Showing posts with label HTML/HTML5 Interview Questions and Answers. Show all posts

Monday, October 26, 2015

HTML/HTML5 Interview Questions and Answers

11) How to use <form> in HTML?
Below is the syntax of <form> in HTML form –
<form action="[URL]">
When form is submitted then form data has been sent to URL, which is specified in the URL attribute. URL is referred to server side program.

12) What is hyperlink in HTML?
Hyperlinks can be used in images and for texts. Below is the examples of using hyperlinks –
<a href=”My URL “>…</a>
13) Explain <ul> in HTML?
In HTML <ul> defined for unordered list. <li> tags will be used along with <ul>.
<ul>
<li>Add</li>
<li>Subtract</li>
<li>Divide</li>
</ul>
14) Explain type and value attributes of <li> in HTML?
Type attribute in <li> is used to specify the style of bullet point of an item in list.
Value attribute in <li> tag is used to set the value of list item in list.
Syntax for type and value of <li>
<li type="a">Add</li>
<li value="100">Add</li>
15) How to set the focus to the element in HTML?
Below is the sample code to set the focus for HTML element –
<input type="text" id="mytestinput" name="mytestinput" ...>
<script type="text/javascript">
document.myform.mytestinput.focus();
</script>

Monday, October 19, 2015

HTML/HTML5 Interview Questions and Answers

1) What is HTML?
HTML (HyperText Markup Language) is a markup language for web pages. So HTML will have HTML elements, which is enclosed in angular brackets.
2) What are tags in HTML?
Tags are content in HTML to format the HTML properly. It uses symbols like “<” and “>” to enclose the tags. “/” symbol is used for closing the tag.
3) What is XHTML?
XHTML will follow XML rules. So it means it is a case sensitive. HTML pages can be changed to XHTML. So during this process we have to find the images, line breaks etc. to include the closing tags. XHTML is compatible with XML.
4) What is DHTML?
DHTML is a combination of HTML and client side scripting languages like – javascript, css etc. Good example for this would be navigation menu in web page.
5) How we can insert comment in HTML?
Below is the example for writing the comment in HTML –
<!-- MY SAMPLE COMMENT -->