Important Question of HTML and Answer solution
1. What are three ways to reduce page load time?
Again there are many answers here: Reduce image sizes, remove unnecessary widgets, HTTP compression, put CSS at the top and script references at the bottom or in external files, reduce lookups, minimize redirects, caching, etc.
2. What kind of things must you be wary of when design or developing for multilingual sites?
Another problem with many solutions: setting the default language, using Unicode encoding, using the ‘lang’ attribute, being aware of standard font sizes and text direction, and language word length (may affect layout).
3. What does DOCTYPE mean?
The term DOCTYPE tells the browser which type of HTML is used on a webpage. In turn, the browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE or using a wrong DOCTYPE may load your page in Quirks Mode. See example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4. What are the limitations when serving XHTML pages?
Perhaps the biggest issue is the poor browser support XHTML currently enjoys. Internet Explorer and a number of other user agents cannot parse XHTML as XML. Thus, it is not the extensible language it was promised to be. There are many other issues. Take your pick.
5. How many HTML tags are should be used for the most simple of web pages?
total. 4 pairs of tags.
<HTML>
<HEAD>
<TITLE>Simplest page ever!</TITLE>
</HEAD>
<BODY>
Doesn’t get simpler than this.
</BODY>
</HTML>
7. How do you make comments without text being picked up by the browser?
Comments are used to explain and clarify code or to prevent code from being recognized by the browser. Comments start with “*<!--” and end with ” -->“.
<!-- Insert comment here. -->
8. What is the difference between linking to an image, a website, and an email address?
To link an image, use <img> tags. You need specify the image in quotes using the source attribute, src in the opening tag. For hyperlinking, the anchor tag, <a>, is used and the link is specified in the href attribute. Text to be hyperlinked should be placed between the anchor tags. Little known fact: href stands for “hypertext reference.” When linking to an email, the href specification will be “examples below:
<img src=”HTMLrocks.jpg”></img>
<a href=”skilprelaunch2.wpengine.com”>Skilledup</a>
<a href=”brad@skilledup.com”>Email Me</a>
9. My hyperlink or image is not displaying correctly, what is wrong with it?
It could be any number of things, but the most common mistakes are leaving out a tag bracket or quote missing for href, src, or alt text may be the issue. You should also verify the link itself.
18. What is the syntax difference between a bulleted list and numbered list?
Bulleted lists use the <ul> tag, which stands for “unordered,” whereas <ol> is used to create an ordered list.
10. What is the difference between <div> and <frame>?
A <div> is a generic container element for grouping and styling, whereas a <frame> creates divisions within a web page and should be used within the <frameset> tag. The use of <frame> and <frameset> are no longer popular and are now being replaced with the more flexible <iframe>, which has become popular for embedding foreign elements (ie. Youtube videos) into a page.
11. Do all HTML tags come in pair?
No, there are single HTML tags that does not need a closing tag. Examples are the <img> tag and <br> tags.
12. 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 this list types makes use of a different tag set to compose
13.How do you insert a comment in html?
html interview Questions
Comments in html begins with “<!–“nd ends with “–>”. For example:
<!-- A SAMPLE COMMENT -->
1
<!-- A SAMPLE COMMENT -->
14. 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.
15. What is 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.
16. What is the advantage of collapsing white space?
White spaces are blank sequence of space characters, which is actually treated as a single space character in html. Because the browser collapses multiple space 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.
16. 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 a size.
17. 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.
18.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”more
No comments