HTML quiz1

HTML Quiz Results
Score: 33 of 40

82% Correct:

Question 1:
What does HTML stand for?

Hyper Text Markup Language    Your answer  
Hyperlinks and Text Markup Language
Home Tool Markup Language
Question 2:
Who is making the Web standards?

The World Wide Web Consortium    Your answer  
Mozilla
Google
Microsoft
Question 3:
Choose the correct HTML element for the largest heading:

<h1>    Your answer  
<heading>
<h6>
<head>
Question 4:
What is the correct HTML element for inserting a line break?

<br>    Your answer  
<lb>
<break>
Question 5:
What is the correct HTML for adding a background color?

<body style="background-color:yellow;">    Your answer  
<background>yellow</background>
<body bg="yellow">
Question 6:
Choose the correct HTML element to define important text

<important>    Your answer  
<strong>    Correct answer  
<i>
<b>
Question 7:
Choose the correct HTML element to define emphasized text

<em>    Your answer  
<italic>
<i>
Question 8:
What is the correct HTML for creating a hyperlink?

<a href="http://www.w3schools.com">W3Schools</a>    Your answer  
<a name="http://www.w3schools.com">W3Schools.com</a>
<a>http://www.w3schools.com</a>
<a url="http://www.w3schools.com">W3Schools.com</a>
Question 9:
Which character is used to indicate an end tag?

<    Your answer  
^
*
/    Correct answer  
Question 10:
How can you open a link in a new tab/browser window?

<a href="url" target="_blank">    Your answer  
<a href="url" target="new">
<a href="url" new>
Question 11:
Which of these elements are all <table> elements?

<table><tr><td>    Your answer  
<table><head><tfoot>
<thead><body><tr>
<table><tr><tt>
Question 12:
Inline elements are normally displayed without starting a new line.

True    Your answer  
False
Question 13:
How can you make a numbered list?

<ol>    Your answer  
<list>
<ul>
<dl>
Question 14:
How can you make a bulleted list?

<ul>    Your answer  
<ol>
<dl>
<list>
Question 15:
What is the correct HTML for making a checkbox?

<input type="checkbox">    Your answer  
<check>
<checkbox>
<input type="check">
Question 16:
What is the correct HTML for making a text input field?

<input type="text">    Your answer  
<textfield>
<textinput type="text">
<input type="textfield">
Question 17:
What is the correct HTML for making a drop-down list?

<select>    Your answer  
<input type="list">
<input type="dropdown">
<list>
Question 18:
What is the correct HTML for making a text area?

<textarea>    Your answer  
<input type="textarea">
<input type="textbox">
Question 19:
What is the correct HTML for inserting an image?

<img src="image.gif" alt="MyImage">    Your answer  
<img href="image.gif" alt="MyImage">
<image src="image.gif" alt="MyImage">
<img alt="MyImage">image.gif</img>
Question 20:
What is the correct HTML for inserting a background image?

<body style="background-image:url(background.gif)">    Your answer  
<body bg="background.gif">
<background img="background.gif">
Question 21:
An <iframe> is used to display a web page within a web page.

True    Your answer  
False
There is no such thing as an <iframe>
Question 22:
HTML comments start with <!-- and end with -->

True    Your answer  
False
Question 23:
Block elements are normally displayed without starting a new line.

False    Your answer  
True
Question 24:
Which HTML element defines the title of a document?

<title>    Your answer  
<meta>
<head>
Question 25:
Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

alt    Your answer  
title
src
longdesc
Question 26:
Which doctype is correct for HTML5?

<!DOCTYPE html>    Your answer  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5.0//EN" "http://www.w3.org/TR/html5/strict.dtd">
<!DOCTYPE HTML5>
Question 27:
Which HTML element is used to specify a footer for a document or section?

<footer>    Your answer  
<section>
<bottom>
Question 28:
In HTML, you can embed SVG elements directly into an HTML page.

False    Your answer  
True    Correct answer  
Question 29:
What is the correct HTML element for playing video files?

<video>    Your answer  
<movie>
<media>
Question 30:
What is the correct HTML element for playing audio files?

<audio>    Your answer  
<sound>
<mp3>
Question 31:
The HTML global attribute, "contenteditable" is used to:

Specify whether the content of an element should be editable or not    Your answer  
Return the position of the first found occurrence of content inside a string
Specifies a context menu for an element. The menu appears when a user right-clicks on the element
Update content from the server
Question 32:
In HTML, onblur and onfocus are:

Event attributes    Your answer  
HTML elements
Style attributes
Question 33:
Graphics defined by SVG is in which format?

CSS    Your answer  
HTML
XML    Correct answer  
Question 34:
The HTML <canvas> element is used to:

draw graphics    Your answer  
create draggable elements
display database records
manipulate data in MySQL
Question 35:
In HTML, which attribute is used to specify that an input field must be filled out?

required    Your answer  
placeholder
validate
formvalidate
Question 36:
Which input type defines a slider control?

slider    Your answer  
search
controls
range    Correct answer  
Question 37:
Which HTML element is used to display a scalar measurement within a range?

<range>    Your answer  
<meter>    Correct answer  
<measure>
<gauge>
Question 38:
Which HTML element defines navigation links?

<nav>    Your answer  
<navigate>
<navigation>
Question 39:
In HTML, what does the <aside> element define?

A navigation list to be shown at the left side of the page    Your answer  
Content aside from the page content    Correct answer  
The ASCII character-set; to send information between computers on the Internet
Question 40:
Which HTML element is used to specify a header for a document or section?

<header>    Your answer  
<top>
<section>
<head>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以为您提供一个简单的考试页面的示例代码,您可以参考以下代码: HTML代码: ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>考试页面</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="container"> <h1>考试题目</h1> <form id="quiz-form"> <div class="question"> <h2>问题1:</h2> <label> <input type="radio" name="q1" value="a"> 选项A </label> <label> <input type="radio" name="q1" value="b"> 选项B </label> <label> <input type="radio" name="q1" value="c"> 选项C </label> </div> <div class="question"> <h2>问题2:</h2> <label> <input type="radio" name="q2" value="a"> 选项A </label> <label> <input type="radio" name="q2" value="b"> 选项B </label> <label> <input type="radio" name="q2" value="c"> 选项C </label> </div> <div class="question"> <h2>问题3:</h2> <label> <input type="radio" name="q3" value="a"> 选项A </label> <label> <input type="radio" name="q3" value="b"> 选项B </label> <label> <input type="radio" name="q3" value="c"> 选项C </label> </div> <button type="submit">提交答案</button> </form> </div> <script src="script.js"></script> </body> </html> ``` CSS代码: ``` .container { width: 80%; margin: 0 auto; text-align: center; } h1 { font-size: 2rem; margin-bottom: 2rem; } .question { margin: 2rem 0; } h2 { font-size: 1.5rem; margin-bottom: 1rem; } label { display: block; margin-bottom: 1rem; } button[type="submit"] { font-size: 1.2rem; background-color: #4CAF50; color: #fff; padding: 1rem; border: none; border-radius: 5px; margin-top: 2rem; cursor: pointer; } button[type="submit"]:hover { background-color: #3e8e41; } ``` JavaScript代码: ``` const quizForm = document.querySelector('#quiz-form'); quizForm.addEventListener('submit', (event) => { event.preventDefault(); // 阻止默认提交行为 const formData = new FormData(quizForm); let score = 0; for (let [question, answer] of formData.entries()) { if (answer === 'a') { score += 1; } } alert(`您的得分是 ${score} 分`); }); ``` 这是一个简单的考试页面,包含3个问题和每个问题的3个选项。当用户提交答案后,JavaScript代码将计算用户的得分并弹出一个包含得分的警告框。您可以根据需要修改代码来适应您的需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值