1) What is 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.
5) How we can insert comment in HTML?
Below is the example for writing the comment in HTML –
<!-- MY SAMPLE COMMENT -->
6) What is DOCTYPE?
Every HTML elements should begin with this declaration of DOCTYPE. This is used to specify the version of HTML used in the given document.
7) Which editors I can use for HTML development?
Below are the list of editors which I can use for HTML development –
- CoffeeCup HTML Editor.
- Microsoft Expression Web.
- NotePad ++.
- TextEdit etc.
8) Explain HTML Headings?
In HTML, title or subtitle can be given from heading tags. So the size of the text depends on heading tag. Eg:
9) How to align <table> right/left in HTML?
If you are using <table> tag, then “align” attribute can be used to align the table to right/left. Below is the sample to align the table to right/left.
10) How we can display <table> at the center of the webpage?
Below is the example to show it -
<div style="margin-left: auto; margin-right: auto;">
11) How to use <form> in HTML?
Below is the syntax of <form> in HTML form –
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>.
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>
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" ...>
16) Is it possible to have multiple actions in a same form?
No. It is not possible to have multiple actions in a single form tag.
17) How to redirect to new page on click of button in HTML?
Below is the sample code to redirect to new page on post and on click of button –
<form action=”your url”>
<input type=”submit” value=”MyClick” =/>
18) How we can have different cells in each row in <table>?
We can have “td” tags in each row <tr>.
Below is the sample code for using <td> in <tr> -
<TD>Test Column 1</TD>
<TD>Test Column 2</TD>
19) What is the difference between <div> and <span> in HTML?
<div> is like a container and it is like having <br> (line break) tag before and after the block.
<span> is a inline and it is used for small HTML like paragraph.
20) Which browsers have a support to HTML 5?
Almost all latest browsers have a support for HTML which includes Chrome, FireFox, IE etc.