Home > Web Front-end > HTML Tutorial > Web front-end written test question bank HTML chapter

Web front-end written test question bank HTML chapter

青灯夜游
Release: 2022-04-21 14:41:08
forward
4167 people have browsed it

Summarized some web front-end interview (written test) questions to share with you. This article will first share with you the HTML part of the written test questions (with answers). You can do it yourself and see how many you can answer correctly!

Web front-end written test question bank HTML chapter

Related recommendations: "Web Front-end Written Test Question Bank CSS Chapter"

Q1: Is <keygen> the correct HTML5 tag?

A: Yes.

<keygen> The tag specifies the key pair generator field to use for the form. When the form is submitted, the private key is stored locally and the public key is sent to the server. is an HTML5 tag.

Q2: <bdo> Can labels change the text direction?

A: Yes.

<bdo> tag overrides the default text direction.

<bdo dir="rtl">Here is some text</bdo>
Copy after login

Q3: Is the following HTML code correct?

<figure>
    <img src="myimage.jpg" alt="My image">
    <figcaption>
        <p>This is my self portrait.</p>
    </figcaption>
</figure>
Copy after login

A: Correct

<figure> The tag specifies independent stream content (images, charts, photos, code, etc.). The content of the figure element should be related to the main content, but should have no impact on document flow if removed. Use the <figcaption> element to add a caption to the figure.

Q4: Under what circumstances should the small tag be used? When you want to create a subtitle after an h1 title? Or should I add copyright information in the footer?

A: The small tag is generally used in copyright information and legal text. It can also be used to mark additional information in the title (visible in bootstrap), but it cannot be used to create subtitle.

The HTML Small Element (<small>) makes the text font size one size smaller (for example, from large to medium, or from small to x-small) down to the browser's minimum font size. In HTML5, this element is repurposed to represent side-comments and small print, including copyright and legal text, independent of its styled presentation.

Q5: In a well-structured web page, will multiple h1 tags be detrimental to SEO?

A: No impact.

According to Matt Cutts (lead of Google's webspam team and the de facto expert on these things), using multiple

tags is fine, as long as you're not abusing it (like sticking your whole page in an

and using CSS to style it back to normal size). That would likely have no effect, and might trigger a penalty, as it looks spammy.

If you have multiple headings and it would be natural to use multiple

's, then go for it.

Excerpted from: http://www.quora.com/Does-using-multiple-h1-tags-on -a-page-affect-search-engine-rankings

Q6: If you have a search results page, you want to highlight search keywords. What HTML tags can be used?

A: The <mark> tag displays highlighted text.

The HTML <mark> Element represents highlighted text, i.e., a run of text marked for reference purpose, due to its relevance in a particular context. For example it can be used in a page showing search results to highlight every instance of the searched for word.

Q7: What does the scope attribute do in the following code?

<article>
    <h1>Hello World</h1>
    <style scoped>
        p {
            color: #FF0;
        }
    </style>
    <p>This is my text</p>
</article>
<article>
    <h1>This is awesome</h1>
    <p>I am some other text</p>
</article>
Copy after login

A: The scoped attribute is a Boolean attribute. If this attribute is used, the style is applied only to the parent element of the style element and its children.

Q8: Does HTML5 support block-level hyperlinks? For example:

<article>
    <a href="#">
        <h1>Hello</h1>
        <p>I am some text</p>
    </a>
</article>
Copy after login

A: Supported.

The element in HTML5 appears as a hyperlink and supports any inline elements and block-level elements.

Q9: Will a new HTTP request be triggered when the following HTML code is loaded?

A: Yes

Q10: Will a new HTTP request be triggered when the following HTML code is loaded?

A: Yes!

Q11: Will main1.css be loaded and compiled in alert('Hello world')?

A: Yes!

Q12: Does main1 have to be downloaded and parsed before main2.css is obtained?

A: no!

Q13: Will main2.css be loaded and compiled after Paragraph 1 is loaded?

A: yes!

[Related recommendations: html video tutorial, web front-end]

The above is the detailed content of Web front-end written test question bank HTML chapter. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:github.io
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template