Here we have the set of most frequently asked question and answers on HTML in almost every interview.
you can Learn complete HTML course for free FREE ONLINE HTML TUTORIAL
Q&A
Q1. Do all HTML tags come in a pair?
No, there are single HTML tags that do not need a closing tag. Examples are the <img> tag and <br> tags. Read more about Tags
Q2. What are some of the common lists that can be used when designing a page?
You can insert any or a combination of the following list types:
– ordered list
– unordered list
– definition list
– menu list
– directory list
Each of these list types makes use of a different tag set to compose
Q3. How do you insert a comment in HTML?
Comments in HTML begins with “<!–“nd ends with “–>”. Reference tutorial for HTML Comments
Q4. 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. Reference tutorial for HTML Display
Q5. 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
Q6. Can attribute values be set to anything or are there specific values that they accept?
Some attribute values can be set to only predefined values. Other attributes can accept any numerical value that represents the number of pixels for size. Read more about HTML Attributes.
Q7. How do you insert a copyright symbol on a browser page?
To insert the copyright symbol, you need to type © or & #169; in an HTML file
Q8. How do you create links to sections within the same page?
Links can be created using the <a> tag, with referencing through the use of the number (#) symbol. For example, you can have one line as <a href=”#topmost”>BACK TO TOP</a>, which would result in the words “BACK TO TOP” appearing on the webpage and links to a bookmark named topmost. You then create a separate tag command like <a name=”topmost”> somewhere on the top of the same webpage so that the user will be linked to that spot when he clicked on “BACK TO TOP”. Read more about links.
Q9. 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.
Q10. Do older HTML files work on newer browsers?
Yes, older HTML files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.
Q11. 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.
Q12. What are style sheets?
Style sheets enable you to build consistent, transportable, and well-defined style templates. These templates can be linked to several different web pages, making it easy to maintain and change the look and feel of all the web pages within the site.
Q13. State bullet types available in HTML
With ordered lists, you can select to use some different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.
Q14. How do you create multicoloured text in a webpage?
To create text with different colors, use the <font color=”color”>…</font> tags for every character that you want to apply color. You can use this tag combination as many times as needed, surrounding a single character or an entire word.
Q15. Why are there both numerical and named character entity values?
The numerical values are taken from the ASCII values for the various characters, but these can be difficult to remember. Because of this, named character entity values were created to make it easier for web page designers to use.