HTML Questions & Answers – Search Engine Optimization & Old Browser vs New Elements

This set of HTML Puzzles focuses on “Search Engine Optimization & Old Browser vs New Elements”.

1. Which browser was the first that allows CSS rules to be associated with new HTML5 layout elements?
a) Internet Explorer 9
b) Internet Explorer 7
c) Chrome
d) Firefox
View Answer

Answer: a
Explanation: Internet Explorer was the first version that allowed CSS rules to be associated with new HTML5 layout elements. Older browsers that do not know new HTML5 elements will by default treat them as inline elements.

2. Which element is used for or styling HTML5 layout?
a) PHP
b) JavaScript
c) CSS
d) jQuery
View Answer

Answer: c
Explanation: For styling HTML5, CSS i.e Cascading Style Sheet is used. It is style sheet language and designed to describe presentation of its content including layouts, colors and fonts. CSS can control the layout of multiple web pages.

3. Which syntax will cause IE to recognize section element?
a) getElementById(“section”)
b) createElement.document(“section”)
c) document.createElement(“section”)
d) document.createElement(“<section>”)
View Answer

Answer: c
Explanation: document.createElement(“section”) will cause Internet Explorer to recognize section element all of a sudden. There is no any reason behind this working but it works. We do not even need to use node that is returned by that function.

4. Dirty Markup will not validate ___________
a) CSS
b) JavaScript
c) PHP
View Answer

Answer: c
Explanation: Linter application will point out the errors and can flag up the warning about bad practices in CSS. There is so many online linter application. Dirty Markup is the best one used for JavaScript, CSS, and HTML. CSS Lint is for CSS only. Dirty Markup also provides to fix your markup using a clean button.

5. For handling CSS prefixes Chrome uses ___________
a) –ms-
b) –webkit-
c) –moz-
d) –chr-
View Answer

Answer: b
Explanation: Handling CSS prefixes is a mechanism originally used to allow browser vendors to implement their own version of CSS. Mozilla uses –moz-, Microsoft uses –ms-, Chrome, Safari, Opera uses –webkit-.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. Which one of the following will add prefix automatically?
a) Gulp
b) PostCSS
c) Selectivizr
d) MooTools
View Answer

Answer: b
Explanation: We can add prefixes automatically during the time of development. This can be done using tools like PostCSS and Autoprefixer. Autoprefixer has an online version that allows to enter non-prefixed CSS on left, and gives prefix-added version on the right. Gulp is an open source kit for js i.e. JavaScript. A javascript utility that emulates CSS3 pseudoclasses and attribute selectors are called selectivizr. Moo Tool is a javascript framework which is object oriented.

7. The search that can’t be targeted by SEO is _______
a) video search
b) image search
c) academic search
d) audio search
View Answer

Answer: d
Explanation: SEO stands for Search Engine Optimization. SEO can target different kinds of search including video search, image search, academic search, industry specific vertical search, news search. It differs from local search engine optimization. Optimization of a website includes editing its content, doing HTML, and associated coding to increase its relevance to specific keywords.

8. Which of the following does not use a crawler to find pages for the search result?
a) Bing
b) Backrub
c) Yahoo
d) Google
View Answer

Answer: b
Explanation: Leading search engines like Bing, Google and Yahoo use crawlers for finding pages for the algorithmic search results. Pages linked from other search engine indexed pages do not need to be submitted because they are found by default.

9. For keeping blog comment spam down we use ___________
a) nofollow
b) meta
c) title
d) heading
View Answer

Answer: a
Explanation: nofollow attribute is used for comments in blogs to keep blog comment spam down. This tag was created to keep spammy users away. This attribute tells Google and other search engines to not follow the link to the next page. Heading contains tag starting from h1 to h6. Title of the document is defined by title which is helpful for search engines. Meta is something related to data i.e like information of data.

10. ‘Image Alt’ tags is not used for ____________
a) diagrams
b) screenshots
c) decorative images
d) infographics
View Answer

Answer: c
Explanation: ‘Image Alt’ tags should not be used for decorative images. It should be used for diagrams, Infographics, Photos of team members, Website logo, Images of merchandise and many other places where it’s an appropriate usage.

11. Which tag is used for stopping duplicate content?
a) canonical tag
b) image alt tag
c) nofollow
d) meta
View Answer

Answer: a
Explanation: When we have a lot of web pages having similar content, this is a good way to stop duplicate content. This is also important to syndicate the content.

 E.g. <link rel= “canonical” href=>

Meta elements like noindex and follow can also be used to stop duplicate content.

12. Which one of the following is used to identify an anchor link?
a) #
b) #!
c) #?
d) &
View Answer

Answer: a
Explanation: Lone Hash (#) is used to identify anchor link i.e. jump links. These are the links that let one jump to the piece of content on a page. Anything after this lone hash portion of URL is never sent to the server and automatically scroll to the first element and to the id which it matches.

Sanfoundry Global Education & Learning Series – HTML.

To practice all Puzzles on HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.