search
HomeWeb Front-endHTML TutorialWeb front-end written test question bank HTML chapter

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></keygen> the correct HTML5 tag?

A: Yes.

<keygen></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></bdo> Can labels change the text direction?

A: Yes.

<bdo></bdo> tag overrides the default text direction.

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

Q3: Is the following HTML code correct?

<figure>
    <img src="/static/imghwm/default1.png"  data-src="myimage.jpg"  class="lazy"   alt="My image">
    <figcaption>
        <p>This is my self portrait.</p>
    </figcaption>
</figure>

A: Correct

<figure></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></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></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></mark> tag displays highlighted text.

The HTML <mark></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 id="Hello-nbsp-World">Hello World</h1>
    <style scoped>
        p {
            color: #FF0;
        }
    </style>
    <p>This is my text</p>
</article>
<article>
    <h1 id="This-nbsp-is-nbsp-awesome">This is awesome</h1>
    <p>I am some other text</p>
</article>

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 id="Hello">Hello</h1>
        <p>I am some text</p>
    </a>
</article>

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?

<img src="/static/imghwm/default1.png"  data-src="mypic.jpg"  class="lazy"     style="max-width:90%" alt="My picture">

A: Yes

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

<div style="display: none;">
    <img src="/static/imghwm/default1.png"  data-src="mypic.jpg"  class="lazy"   alt="My photo">
</div>

A: Yes!

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

<head>
    <link href="main1.css" rel="stylesheet">
    <script>
        alert(&#39;Hello World&#39;);
    </script>
</head>

A: Yes!

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

<head>
    <link href="main1.css" rel="stylesheet">
    <link href="main2.css" rel="stylesheet">
</head>

A: no!

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

<head>
    <link href="main1.css" rel="stylesheet">
</head>
<body>
    <p>Paragraph 1</p>
    <p>Paragraph 2</p>
    <link href="main2.css" rel="stylesheet">
</body>

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!

Statement
This article is reproduced at:github. If there is any infringement, please contact admin@php.cn delete
Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How does deepseek official website achieve the effect of penetrating mouse scroll event?How does deepseek official website achieve the effect of penetrating mouse scroll event?Apr 30, 2025 pm 03:21 PM

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

How to modify the playback control style of HTML videoHow to modify the playback control style of HTML videoApr 30, 2025 pm 03:18 PM

The default playback control style of HTML video cannot be modified directly through CSS. 1. Create custom controls using JavaScript. 2. Beautify these controls through CSS. 3. Consider compatibility, user experience and performance, using libraries such as Video.js or Plyr can simplify the process.

What problems will be caused by using native select on your phone?What problems will be caused by using native select on your phone?Apr 30, 2025 pm 03:15 PM

Potential problems with using native select on mobile phones When developing mobile applications, we often encounter the need for selecting boxes. Normally, developers...

What are the disadvantages of using native select on your phone?What are the disadvantages of using native select on your phone?Apr 30, 2025 pm 03:12 PM

What are the disadvantages of using native select on your phone? When developing applications on mobile devices, it is very important to choose the right UI components. Many developers...

How to optimize collision handling of third-person roaming in a room using Three.js and Octree?How to optimize collision handling of third-person roaming in a room using Three.js and Octree?Apr 30, 2025 pm 03:09 PM

Use Three.js and Octree to optimize collision handling of third-person roaming in the room. Use Octree in Three.js to implement third-person roaming in the room and add collisions...

What problems will you encounter when using native select on your phone?What problems will you encounter when using native select on your phone?Apr 30, 2025 pm 03:06 PM

Issues with native select on mobile phones When developing applications on mobile devices, we often encounter scenarios where users need to make choices. Although native sel...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment