INTERVIEW QUESTIONS ON HTML
INTERVIEW QUESTIONS: -Hi readers, We have prepared some list of INTERVIEW QUESTIONS on HTML.All INTERVIEW QUESTIONS of HTML has a reasonable answer.While Preparing for a technical job interview of company this can be very useful for you.Here we start topic INTERVIEW QUESTIONS on HTML
TOP 20 INTERVIEW QUESTIONS on HTML
What do you understand by “markup” in HyperText Markup Language(HTML)?
Markup in HTML determines the look and structure of the web page.
Is HTML is a programming language.Explain Reason?
No HTML is only a Markup language.Which is used to create the only structure of the website and how the content will be displayed.For Programming Language it should have a functional purpose and can’t create logic.Here I start a session about INTERVIEW QUESTIONS of HTML.
What do you understand by DOCTYPE in HTML?
DOCTYPE tag in HTML is not an HTML tag it just an information was given to the HTML document at the beginning so that the browser understand the version used by the HTML and allow correctly and easy rendering of web pages. IT must be noted that DOCTYPE is sometimes referred as Document type definition (DTD) and placed before the <html>tag begins.
<! DOCTYPE html>
The difference between Block level element and inline element?
Block level element:
Block element are those which covers the full width of the browser and has a line break before and after it automatically. It can contain block or inline element.
Some block level elements are: <address>..</address>,<h1>,<h2>,…,<h6>, <hr/>,<ul><ol> etc.
An inline element is those which covers space as much as it required and does not force a line break. It can contain data or other inline elements.
Some inline elements are : <a >,<b>,<i>,<u>,<select>,<input />etc
What do you mean by empty elements in HTML ?
Empty HTML elements(also called self-closing elements) are those elements which do not contain any content.
It does not have any ending tag. The tag ends in the starting tag by using forward slash (/) eg.<br /> and HTML5 does not require slash(/) to close the empty element
Note: Empty elements is written simply as <br> but in XHTML empty elements requires space and trailing slash <br />
Can we use Hyperlink other than text?
Yes, we can use hyperlinks other than text such as Images.
<a href=”www.company.com”><imgsrc=”/yourpath/image.jpg” />
This code will work same as we used hyperlinks with text which links one page to another through text, but here we link through images.
What is a comment and how we can provide comments in HTML?
In the computer programming, the comment is used generally for making the program easily readable and understandable by the user. Comments are ignored by the compiler, interpreter, and browser and mainly included in the file for easily readable.
In HTML document, we can provide comment using <!—comment — >
- Single line <!—comment– >
- Multiple line <!—
Is it possible to insert a copyright symbol in the web page through HTML?
Yes, it is possible by writing © or © in an HTML document.
What is a function of alt attribute in an <img>element?
Alt: This attribute is used to give the alternative label or short description for the image used. If somehow due to connection problem or the image is replaced with the file then this short description about the images using alt attribute is displayed even by the browser which is helpful for the user to clarify what image should be there.
An upper limit of text field?
By default, the size of a text field is around 13 characters.
The difference between the size and max length attribute of a text field in HTML?
Size: this attribute is used to specify the width of a textbox in terms of characters. It does not affect how many characters the users can enter in a textbox. If the user enters more characters than the size of textbox specified by size property than they can see what they enter by simply scrolling left or right
Max length: this attribute is used to specify the maximum no. of characters the user can enter in the textbox. A user cannot enter any characters more than the max length of text field specified by maxlength attribute.
List the browser which supports HTML 5?
Almost all browser supports HTML5. Some of them are:
- Mozilla Firefox
- Internet Explorer
All the HTML tags have starting and ending tags always?
No , some tags in HTML have starting tag only. Examples
<img /> : for inserting image in HTML.
<br /> : for breaking line.
<hr /> : for giving horizontal line in an HTML.
Explain <embed> tag in HTML?
Just like images you can simply embed a video or an audio file (multimedia file) in an HTML document by using <embed > ..</embed>tag.
<embed src=”path/file.mid|.mpeg|.mov|.wmv|.swf” >
<imgsrc=”path/image.jpg ” alt=”image” />
Here <noembed>tag is used to display an alternative image if the browser does not support <embed> tag.
Define different types of the list in HTML?
In an HTML, List is of three types:
- <ul>: Unordered list
- <ol>: Ordered List
- <dl>: Definition List
Unordered List is used to making the List in an unordered way or we can say by using simple plain bullets.
Ordered List is used to making the List in a sequence by providing numbers or Roman numerals instead of bullets.
Definition List is used to making the list just as we see in dictionary or encyclopedia. It uses three tags <dl>,<dt> and <dd>.
Tell me the different ways of Website layout in HTML?
Website layout simply means how we can structure our website or how our web page looks on browser. In HTML we can layout using two different ways :
Simplest way to create a layout by making table.
Div is an html block level element and is mainly used for grouping different element into one.
What is an inline frame in HTML?
Inline frame in HTML is a frame which can appear anywhere in HTML document which can embed any other images, sound, youtube videos or HTML documents even.
Inline frame in HTML is given by <iframe>tag in HTML document. It provides the rectangular region with its own scrollbar independent of the surrounding page’s scroll bar along with borders to display the embedded object (videos or images or maps etc.). some browser does not support<iframe>.
<iframesrc=”/abc.html”><iframe> (including HTML document)
What do you understand by <pre> tag?
</pre>element in HTML is called as Preformatted text .It is a block level element. Text inside the <pre> tag is displayed in a fixed-width font (“monospace”) and in the same way as typed in the document including whitespace and newline and tab.
<pre>tag is generally used for displaying programming code and unusual formatting text.
Is <table width=100%> is used to give full browser width?
No, here the table does not occupy the full browser width even the width is given 100% as the graphical browser is basically designed to leave a margin between the actual content and the display area.
Even the navigator also leaves some space for the scroll bar on the right-hand side of the display area. If the page is not long enough, the scrollbar does not appear.
What do you understand by marquee tag in HTML?
marquee element in an HTML is generally used to insert scrolling area of text either horizontal or vertical.
<marquee> tag is generally now not used by the browser instead we can use CSS for providing this effect.