In this tutorial we will learn all important html interview questions and also learn html5 interview questions with answers.
HTML is a hypertext markup language for creating web pages.
Html tags are used to mark up the start/opening and end/closing tags.
Tags are two types-
Example - <p> This is opening tag.
</p> This is closing tag.
An HTML element usually consists of a starting tag & end tag.
Example - <p> This is the content of the paragraph element </p> .
Attributes provide additional information about an element and attributes are always specified in the start tag.
All attributes have of two parts -
<a href="https://www.teknowize.com" target="_blank" title="click here">
No,some HTML tag not need a closing tag.
For example -
<image> tag , <br> tag ,<hr> tag etc.
It is a process in which the text is formating for a better look. It use many type of tags for making text bold, italic, underline etc.
The HTML has six types of heading tag. The H1 tag is the largest heading tag and the H6 is the smallest heading tag.
HTML have a tag which is called as ancor tag , which use to create a hyperlink that link one webpage to another webpage.
The ancor tag appear in three ways -
In HTML, the table tag displays the data in tabular form ( row * column ).Layout for the page e.g., header section, navigation bar, body content, footer section also managed by table tag.
List of tags used when displaying the data in tabular form -
|<table>||It defines a table.|
|<tr>||It define a row in a table.|
|<th>||It define a header cell in a table.|
|<td>||It defines a cell in a table.|
|<caption>||It define the table caption.|
|<colgroup>||It specified a group of one or more columns in a table for formatting.|
|<col>||It is use with <colgroup> element to specify column properties for each column.|
|<tbody>||It is use to group the body content in a table.|
|<thead>||It is used to group the header content in a table.|
|<tfooter>||It is used to group the footer content in a table.|
There are many types of list are available but two types of list are commonly use
Copyright symbol can be inserted into a browser page using © or © in an HTML file.
Iframe tag is used to create a nested webpage in HTML. In another word, iframe is used to create a webpage within a webpage.
For example -
Indents are used to keep HTML element straight.
We can apply hyperlink in text and images both. In HTML ancor tag use to link one page with another page.
Style sheet is use to make web pages creative. We use cascading style sheet to designing the web pages.
Yes it is possible to use multi-colored text on a webpage.
The color of the bullet depend on the first text color of the list.
Actually, web pages arrange in which manner, that is described in HTML layout.
<header> : It is used to create head of the website.
<nav> : It is used to create navigation bar of the website.
<section> : It is used to create section in a website.
<article> : Using it we can create an independent, self-contained article.
<aside> : Using it we can create content aside from the content ( just like sidebar ).
<footer> : It is used to create footer of the website.
<br> tag - The <br> tag is used to break the line the text.
<p> tag - <p> tag stand for paragraph tag which means, the text written in the form of new paragraph.
We can put the background image in a webpage by using below code after </head> tag.
The element with no content are known as empty element.
For example - <br> , <hr> etc.
Span tag in HTML is used for -
• To add colour on text.
• To add background on the text.
• To highlight any text.
Iframe tag in HTML used to display a web page inside a web page.
<iframe src="URL"> </iframe>
For example -
Lets learn most important Html5 interview questions.
No, <!DOCTYPE html> tag is not a HTML tag. It is basically used to give instruction to the web browser about the version of the HTML page.
Using HTML SVG we can describe two dimensional vector and vector graphics / raster graphics.
Yes, almost every web browser support HTML5
Example - Chrome, opera, Firefox, Internet explorer, Safari etc.
Now see the code, using which mp3 file can be played in HTML.
On the web page, we can add photo in the document using figure tag.
Using <figcaption> element we can provide a caption to an image. It is optional tag which always used before or after the content in <figure> tag.
In HTML5, <button> tag is used to create a clickable button set the <form> tag.
Datalist tag used to provide facility to the user to choose the predefined option to select data.
No, because if we do not put <! DOCTYPE html> then browser unable to identify the HTML document , due to which some HTML5 tag are not function properly.
The required attribute is used in HTML5 for force the user to fill text in the text field before submitting the form.
The input type added in HTML5 for validation is email, url, number, tel and date.
You can add HTML autocomplete with the below code.
There are many factors which affect the speed of page loading of a website.
Some methods which help to increase page speed are -
• Reduce the size of the image.
• Remove all unnecessary CSS JS file.
• HTTP compression.
• Minimal caching.
• Minimal redirection.
If text does not presents between tags then there is nothing happened but tag which has no closing tag like <image>, <br> then they not required any text.
The default limit of the text field size are 13 character but if you include attribute of size then you can set the size.
Cell spacing is used to provide a gap or space between each cell. Where cell padding is used to provide a gap or space between text written inside the cell.
In HTML there are three ways in which we can include CSS -
• Inline CSS
• External CSS
• Internal CSS
• Script block
Marquee is used to add auto scrollable text/image on your webpage.
Visible area of a webpage on a browser
changes based on the device size.
You can change text color in HTML by HTML style attribute.
You can bold text in HTML by using bold tag or strong tag.
You can move any text into center using HTML center tag.
You can comment HTML source by below syntax
<!-- write your comment here -->
You can link CSS to HTML using link tag. The link tag always placed inside head tag.
<link rel="stylesheet" type="text/css" href=" file path of your .css file " >