HTML Interview Questions Part 2

7. What are Web Standards?

Answer:

Web standards are rules and guidelines established by the World Wide Web Consortium (W3C).

Web standards are developed to promote consistency in the design code of a web page.

It is the guideline for the mark-up language which determines how a web page displays in a visitor's browser window.

W3C (World Wide Web Consortium) standards promote the use of "Cascading Style Sheets" (CSS) or design code which is attached to the web page rather than embedded in the page.

Search Engines are able to access and index pages designed to web standards with greater efficiency.

8. What will you do if I asked you to insert a copyright symbol on your web page?

Answer:

To insert the copyright symbol, I will type © or © in an HTML file.
Copyright sign HTML code.

SymbolName CodeDecimal CodeHex CodeDescription
©©©Copyright symbol
- ⒸⒸC inside circle

Example:

<!DOCTYPE html>
<html>
    <body>
        <p>© 2017 TutorialRide.com<p>
    </body>
</html>


copyright symbol

9. How to keep list elements straight in an HTML file?

Answer:

You can keep the list elements straight by using indents in an HTML file.

The list-style-position property is used to keep list elements straight in an HTML file.

This property specifies if the list-item markers should appear inside or outside the content flow.

By default setting of list-style-position property is outside.

Example:

<!DOCTYPE html>
<html>
    <head>
        <style>
            ul.i
            {
                list-style-position: inside;
            }
            ul.o
            {
                list-style-position: outside;
            }
        </style>
    </head>
    <body>
        <p>list-style-position: inside:</p>
        <ul class="i">
            <li>HTML</li>
            <li>JavaScript</li>
            <li>jQuery</li>
        </ul>
        <p>list-style-position: outside:</p>
        <ul class="o">
            <li>HTML</li>
            <li>JavaScript</li>
            <li>jQuery</li>
        </ul>
    </body>
</html>


list element

10. Is older html files work on newer browsers?

Answer:

Yes, older html files work on newer browsers because these files are compliant to the HTML standard.

Most older files work on the newer browsers, though some features may not work.

While working with older html files, you need to convert them.

11. What will happen if you overlap sets of tags?

Answer:

Overlapping occurs when two or more tags interact in a non-hierarchical manner.

If two sets of html tags are overlapped, only the first tag will be recognized.

You will recognize this problem when the text does not display properly on the browser screen.

12. What is meant by Applet?

Answer:

Applets are small programs that can be embedded within web pages to perform some specific functionality, such as computations, animations, and information processing.

Applets are written using the Java language.

Example:

<applet code="myApplet.class" width="350" height="350">
    //Java applet performs here
</applet>


This tag is not supported in HTML5.