There are certain interview questions that are very likely to come up when discussing HTML. Here’s a list of some of the more common questions and answers you will come across. If you want update your HTML knowledge with a crash course in HTML 5, Upgrading skills with HTML 5 new Features is a great option.
Hypertext Markup Language, or HTML, is the language used to create web pages and display them on browsers. The two primary components of HTML documents are the content and the tags. The tags are used to format the content that is displayed on web pages. Check out this lecture to learn more about what HTML is.
How do you insert a comment in HTML?
HTML comments begin with “<!–” and ends with “–>”.
What are tags?
HTML tags use the less than symbol (<) and the greater than symbol (>) to indicate some modification of the content on the page. Additionally, the slash symbol is often used to signal a closing tag. Here’s a video to help you brush up on HTML tags.
Do all HTML tags come in pairs?
No, there are some single HTML tags that do not have a closing tag. For example, the
tag and tags do not come in pairs.
What lists are commonly used to design a web page?
- unordered list
- ordered list
- directory list
- definition list
- menu list
Each of these list types has a different tag set. Do you need a crash course on HTML list types? Here’s a great video to get you up to speed on HTML lists quickly.
Is there some way to keep list elements organized in an HTML file?
Using indents, you could keep the list elements organized. By indenting each sub-nested list further than the parent list, you could quickly determine the different lists and the elements contained in each.
In the middle of a list, can you change the number type?
There are two attributes for the
- tag. These are type and value. The type attribute can change the numbering type and the value attribute can change the index number.
Can all systems display all character entities properly?
No, some character entities cannot be displayed if the operating system does not support these characters. If that happens, those characters will be displayed as boxes.
Can the symbol be represented when user’s operating system does not support the required character?
When the operating system doesn’t support a character, it’s possible to display those characters using an image instead of text.
What is an image map?
An image map allows you to link to several web pages through one image. Simply define shapes within images and link these to the pages you want. Here’s a video to help you learn more about images and links in HTML.
What is the benefit of collapsing white space in HTML?
Blank sequence of space characters are white space, which is treated like a single space character within HTML files. Since the browser will collapse multiple spaces into a single space, it is possible to indent lines of text and not worry about multiple spaces. Doing this allows you to organize the HTML code into a more readable layout.
Are there specific values that attribute values be set to or do they accept anything?
There are two types of attribute values possible – text and numbers. Text attribute values can only be set to predefined values. Some numerical values are also limited to predefined values. However, other attributes will accept any numerical value often representing the number of pixels for the size of an object.
What code is used to insert a copyright symbol on a web page?
You need to type © or © in an HTML file to insert the copyright symbol.
What code would you use to create links to sections in the same page?
Internal links can be created with the tag and by referencing with the number (#) symbol. You can, for example, us the HTML link RETURN TO TOP. This would display the words “RETURN TO TOP” on the web page which would link to a bookmark named topmost. You would also need to create a second tag command, , somewhere along the top of the same web page. The user will be linked back to that spot when they click on the “RETURN TO TOP” link.