Interview questions for HTML
Before you begin writing your HTML code, you will need to get a few things in order.
- You will first need to decide what program you will use to write your code. If you want to write all of the code yourself, without any assistance, you can open a text editor on your computer.
- If you’re a Mac user, you can open text edit, which should already be installed on your computer. You can open it from your ‘Dock’ or in your ‘Applications’ folder Or you can download the free text editor.
1. What is HTML?
HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web. It makes the text more interactive and dynamic. It can turn text into images, tables, links.
2. What are Tags?
HTML tags are composed of three things: an opening tag, content and ending tag. Some tags are unclosed tags.
HTML documents contain two things:
o content and o tags
When a web browser reads an HTML document, the browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.
3. Do all character entities display properly on all systems?
No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.
4. Do all HTML tags have an end tag?
No. There are some HTML tags that don’t need a closing tag.
5. What is an image map?
Image map lets you link to many different web pages using a single image. You can define shapes in images that you want to make part of an image mapping.
6. What is formatting in HTML?
The HTML formatting is a process of format the text for a better look and feel. It uses different tags to make text bold, italicized.
7. What is the advantage of collapsing white space?
White spaces are a blank sequence of space characters, which is treated as a single space character in HTML. Because the browser collapses multiple spaces into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the HTML code into a much more readable format.
8. What are some common lists that are used when designing a page?
There are many common lists which are used to design a page. You can choose any or a combination of the following list types:
o Ordered list – The ordered list displays elements in numbered format. It is represented by <ol> tag.
o Unordered list – The unordered list displays elements in bulleted format. It is represented by <ul> tag.
o Definition list – The definition list displays elements in definition form like in dictionary. The <dl>, <dt> and <dd> tags are used to define description list.
9. If you see a web address on a magazine, to which web page does it point?
Every web page on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within magazines typically points this top-most page. From this top level page, you can access all other pages within the website.
10. How to insert a copyright symbol on a browser page?
You can insert a copyright symbol by using © or © in an HTML file.
11. Is there any way to keep list elements straight in an HTML file?
By using indents, you can keep the list elements straight. If you indent each sub nested list in further than the parent list that contains it, you can at a glance determine the various lists and the elements that it contains.
12. How do you keep list elements straight in an HTML file?
You can keep the list elements straight by using indents.
13. Do older HTML files work on newer browsers?
Yes, older HTML files are compliant to the HTML standard. Older files work on the newer browsers, though some features may not work.
14. Is the difference between HTML elements and tags?
HTML elements communicate to the browser to render text. When the elements are enclosed by brackets <>, they form HTML tags. Most of the time, tags come in a pair and surround content.
15. Does a hyperlink apply to text only?
No, hyperlinks can be used in the text as well as images. That means you can convert an image into a link that will allow users to link to another page when clicked. Surround the image within the <a href=” “>…</a> tag combinations.
16. Can you create a multi-colored text on a web page?
Yes. To create a multicolor text on a web page you can use <font color =”color”> </font> for the specific texts you want to color.
17. If the user’s operating system does not support the needed character, how can the symbol be represented?
In cases where in their operating system does not support a particular character, it is still possible to display that character by showing it as an image instead.
18. How do you change the number type in the middle of a list?
The <li> tag includes two attributes – type and value. The type attribute can be used to change the numbering type for any list item. The value attribute can change the number index.
19. What is difference between HTML and HTML5?
The differences between HTML and HTML5 are:
1. Document of HTML is very large as compare to the HTML5.
2. Audio and Video tags are not present in HTML whereas HTML5 contains audio and video tags.
3. Vector technology is not integral part of HTML whereas HTML5 Vector technology is the integral part of it.
4. HTML supported by all old browsers whereas HTML5 is supported by new browser.
5. In HTML web sockets are not available whereas in HTML5 Full duplex communication channel is present
20. What is the Use of SPAN in HTML and give one example?
SPAN : Used for the following things:
1. Highlight the any color text
2. For adding colored text
3. For adding background image to text.