Original text: github.com/paddingme/F…
HTML questions and answers
Front End Web Development QuizHTML
-
Q: Is
the correct HTML5 tag? A: yes.
The < keyGen > tag specifies the key pair generator field for the form. When the form is submitted, the private key is stored locally and the public key is sent to the server. It’s an HTML5 tag.
-
Q: Can the tag change the text orientation?
A: I can.
The tag overrides the default text orientation.
<bdo dir="rtl">Here is some text</bdo> Copy the code
-
Q: 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 the code
A: right
The
-
Q: When should you use the small tag? When you want to create subheadings after h1 headings? Or when adding copyright information to the footer?
A: The small tag is generally used in copyright information and legal texts. It can also be used to label additional information in titles (visible in Bootstrap), but it cannot be used to create subtitles.
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. -
Q: Can multiple H1 tags be detrimental to SEO in a well-structured Web page?
A: No.
According to Matt Cutts (lead of Google’s webspam team and the de facto expert on these things), using multiple
<h1>
tags is fine, as long as you’re not abusing it (like sticking your whole page in an<h1>
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
<h1>
‘s, then go for it.From: www.quora.com/Does-using-…
-
Q: If you have a search results page and you want to highlight the search terms. What HTML tags can be used?
A: The tag represents 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. -
Q: 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 the code
A: The scoped property is A Boolean property. If you use this attribute, the style applies only to the parent and child elements of the style element.
-
Does HTML5 support block-level hyperlinks? Such as:
<article> <a href="#"> <h1>Hello</h1> <p>I am some text</p> </a> </article> Copy the code
A: support.
The element in HTML5 is represented as a hyperlink that supports any inline and block-level element.
-
Q: Will a new HTTP request be triggered when the following HTML code loads?
<img src="mypic.jpg" style="visibility: hidden" alt="My picture"> Copy the code
A: wow
-
Q: Will a new HTTP request be triggered when the following HTML code loads?
<div style="display: none;"> <img src="mypic.jpg" alt="My photo"> </div> Copy the code
A: will!
-
Main1.css must be loaded and compiled on alert(‘Hello world’)?
<head> <link href="main1.css" rel="stylesheet"> <script> alert('Hello World'); </script> </head> Copy the code
A: it is!
-
Q: Does main1 have to be downloaded and parsed before main2. CSS can be retrieved?
<head> <link href="main1.css" rel="stylesheet"> <link href="main2.css" rel="stylesheet"> </head> Copy the code
A: no!
-
Q: Is main2. CSS 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> Copy the code
A: yes!
Knowledge summary
-
For browser rendering, check out the following article:
- Introduction to browser rendering principles
- Topic: Browser: Rendering redraw, rearrange two or three things
- The order in which browsers load and render HTML and Gzip issues
- What happens when you type in the URL from the perspective of FE
-
HTML5 convenient information can be read:
- Five new HTML5 features you need to know
- Seven new HTML5 features you must Know about