Top 15 HTML Interview Questions with Answer Keys

If you are a beginner to the web designing/web development, probably this would be the first thing for you to learn. Though there are many enhancements in the technologies that are used to build pages, however, this remains still the basic. Because of which, HTML is one of the basic topics to help evaluate the understanding of the concepts.

Moreover, HTML is the standard markup language for creating Web pages. HTML describes the structure of web pages using the markup. Also, HTML is the building block of web pages and the elements are represented by tags.

Keeping above mentioned things in mind, we have decided to create a blog post to focus on the HTML questions which might be asked in the interview. Keep reading –

 

html interview questions

1. What’s the extension of HTML files?

HTML supports both .htm and .html extension.

2.How do you create a frames?

For creating HTML frames, you have a <frame> tag within a frameset (<frameset>). Here, <frame> tag defines a particular window within the frameset.

3. How can you set an image as a background on the web pages?

To set an image as a background on the web page, point the body background to the name of your image you want to set as a background as shown below- 

</head>  

<body background= “image.gif”>

You can also set the background image, so during using the scroll bar in the browser, it remains still.  To do this add the BGPROPERTIES tag as shown below:- 

<body background = “image.gif”bgproperties=”fixed”>

4. Does a hyperlink apply to text only?

No, hyperlinks can be used in the images as well. That feature converts an image into a link that will allow users to link another page when they clicked. Here, <a href=” “>…</a> tag is used with the <img> tag.

5. What are some of the common lists that can be used when designing a page?

These are the supported list types –

  • Unordered list
  • Ordered list
  • Definition list
  • Menu list
  • Directory list 

6. Name three ways to define a color in HTML?

  1. Hex
  2. RGB
  3. Name (ie blue)

.colorMy { color:blue; color:#1b2dd1; color:rgb(27, 45, 209); }             

HTML                        

7. Explain, what’s the difference between == and === ?

The 3 equal signs mean “equality without type coercion”. Using the triple equals, the values must be equal in type as well.

== is equal to

=== is exactly equal to (value and type) 

Let’s understand this with an example –

0==false // true

0===false // false, because they are of different type

1==”1″ // true, auto type coercion

1===”1″ // false, because they are of different type

8. What is the difference between form get and form post?

 

GET Method

POST Method

They are a part of URL. So, parameters saved in the browser.

In the post, parameters are not saved in history.

Get can be bookmarked.

POST can’t be bookmarked.

This is not secure.

This is Secure.

Easy to hack.

Difficult to hack.

When sending passwords or may some other sensitive information, then GET method should not be used.

And here for sending sensitive information POST method is used.

It can be Cached

It can’t be Cached.

This is Restricted. Only ASCII characters allowed.

Here no restrictions, It also Allows Binary data.

9. What’s the difference between an alert box and confirm box in HTML?

An alert box is a popup box that contains only one element. Most of the times, this is just an information popped up on the user’s screen. There is only one element, eg OK button.

However, confirm box has two buttons – OK and cancel. This is used to ask the user’s choice. 

10. What’s the better way to design the layout of web pages – a table tag or a div tag?

– The better and very efficient way to design the layout of the web pages is the <div> tag.

– The <table> tag is used to present the data in tabular format.

11. How do you create a button in HTML, which acts as a link?

There we have two ways of creating hyperlinks buttons:- 

  1. <FORM ACTION=”[url]” METHOD=get>

                    <INPUT TYPE=submit VALUE=”Text on button”>

           </FORM>

  1. <INPUT TYPE=”Submit” VALUE=”Go to my link”

                  ONCLICK=” http://www.pristinetechschool.com/;” />

12. What’s the image map in HTML?    Job Interview

In HTML, Image map links to different web pages using a single image. Here, you can define shapes in the images and also you want to make a part of an image mapping. 

13. What’s the benefit of collapsing white space?

The Blank sequence of space characters are the White spaces. In HTML, they are treated as a single space character. Because the browser collapses multiple spaces into a single space, hence you can indent lines of text without any worrying about the multiple spaces. This feature enables the designer to organize the much more readable HTML code format.

14. How can you create a link to sections within the same page?

The Links can be created by using the <a> tag and with referencing through the use of the number (#) symbol. Let’s suppose, you have one line as  <a href=”#link”>Show This</a> and the result in the words “Show This” appearing on the web browser and links to a bookmark named link. Then you can create a separate tag like <a name=” link”> on the top of the same web browser so that the user will be linked when he/she clicked on “Show This”.

15. What happens when the no of values in the columns and rows attribute does not add up to 100 %?

The size of browser frames relative to the total sum of the values. when the columns attribute is set to 100%, 200% then the browser shows two vertical frames with the second being double as the first.

successful interview

Apart from this, there are super helpful HTML tutorials available on our Pristine Tech School channel. Please find the information below –
For a free tutorial on various technologies, subscribe to YouTube channel – https://www.youtube.com/channel/UCcWR1IezEQynJnAETgK8g2w?sub_confirmation=1

Facebook – https://www.facebook.com/pristinetechschool

Hope this article was helpful. Let us know if you have any feedback/suggestions for us in the comment section below.

Good Luck. Happy Programming !

24 thoughts on “Top 15 HTML Interview Questions with Answer Keys

  1. I really don’t know the way I finished up below, however imagined this specific post had been terrific. I can’t recognize whom you may very well be but certainly you are going to a well-known doodlekit cleaning soap are certainly not currently. Cheers!

  2. Economy of Russia We n we publish all of them current and important facts USA, estimates experts. All evil on earth exists with the quiet tacit consent of the indifferent. No one provides us with incentives. We are People. We are building a civil society. The people are the bearer of sovereignty and the only source of power. No one can usurp power.

  3. Russian news We n we publish all of them hot and advanced events Russia, estimates experts. All bad in the world happens with the quiet tacit consent of the indifferent. No one provides us with incentives. We are People. We are building a civil society. The people are the bearer of sovereignty and the only source of power. No one can usurp power.

  4. Economy of Russia We n we publish all of them current and important news USA, analytics experts. All bad in the world exists with the quiet tacit consent of the indifferent. No one provides us with incentives. We are Enthusiasts. We are building a civil society. The people are the bearer of sovereignty and the only source of power. No one can usurp power.

  5. Latest news USA We n we publish all of them fresh and advanced news USA, estimates experts. All evil on this planet happens with the quiet tacit consent of the indifferent. No one provides us with incentives. We are Enthusiasts. We are building a civil society. The people are the bearer of sovereignty and the only source of power. No one can usurp power. Useful topics – Photovision

  6. I am no longer positive where you’re getting your information, however great topic adobe web design software. I must spend a while finding out much more or working out more. Thank you for wonderful info I was in search of this info for my mission.

  7. Generally I don’t read article on blogs, but I wish to say that this write-up very compelled me to take a look at and do so! Your writing style has been surprised me. Thank you, very great article.

  8. you are really a excellent webmaster. The web site loading pace is amazing. It seems that you are doing any unique trick. Moreover, The contents are masterpiece. you have done a excellent process in this subject!

  9. hello!,I love your writing so so much! proportion we communicate extra about your article on AOL? I need an expert in this space to resolve my problem. Maybe that is you! Taking a look ahead to see you.

  10. I definitely wanted to jot down a remark so as to thank you for the unique hints you are placing on this site. My rather long internet investigation has at the end been honored with good quality content to exchange with my pals. I would express that we readers are extremely blessed to live in a useful community with very many brilliant people with very beneficial suggestions. I feel somewhat fortunate to have seen your weblog and look forward to tons of more cool moments reading here. Thanks a lot once again for a lot of things.

  11. Someone essentially help to make critically posts I’d state. That is the first time I frequented your website page and up to now? I surprised with the research you made to make this particular publish amazing. Great activity!

  12. Usually I don’t read the post on blogs, however, I wish to say that this write-up very compelled me to check out and do so! Your writing taste has been amazed me. Thank you, a quite great article.

  13. I’ve recently started a website, the info you provide on this website has helped me tremendously. Thank you for all of your time & work. “So full of artless jealousy is guilt, It spills itself in fearing to be spilt.” by William Shakespeare.

  14. I am in fact delighted to read this webpage posts which consists of tons of
    helpful data, thanks for providing such information.

  15. I want to express thanks to you for rescuing me from such a predicament. As a result of searching through the world-wide-web and getting principles which were not productive, I believed my entire life was over. Existing without the presence of answers to the problems you’ve fixed as a result of your entire post is a crucial case, as well as those which might have badly affected my entire career if I hadn’t noticed your web site. The talents and kindness in handling the whole lot was priceless. I am not sure what I would have done if I had not come upon such a step like this. It’s possible to at this moment relish my future. Thank you so much for the skilled and effective guide. I won’t think twice to propose your blog to anybody who needs and wants counselling on this matter.

  16. I got what you mean , regards for putting up.Woh I am happy to find this website through google. “Delay is preferable to error.” by Thomas Jefferson.

  17. Your style is very unique compared to other people I’ve read stuff from.
    Thanks for posting when you have the opportunity, Guess I’ll just
    bookmark this site.

  18. For most recent news you have to pay a visit world-wide-web and on internet
    I found this site as a finest website for hottest updates.

  19. Hello! I’m at work browsing your blog from my new apple iphone!
    Just wanted to say I love reading your blog and look forward to all
    your posts! Keep up the outstanding work!

Leave a Reply

Your email address will not be published. Required fields are marked *