NEW
Font size
WorksheetsInfinity coding school
Total questions: 25
Worksheet time: 7mins
What is HTML?
Hyper text transfer protocol
hyper text marking language
hyper text markup language
standard markup language
Which HTML element is used to create a hyperlink?
<link>
<hyper>
<a>
<url>
Which HTML tag is used to define an unordered list?
<ol>
<ul>
<li>
<dl>
What does the HTML tag <em> do?
It defines a division or a section in an HTML document.
It displays text in a fixed-width font.
It emphasizes text, making it italic.
It creates an ordered list.
What is the correct HTML for inserting an image?
<img src="image.jpg" alt="My Image">
<image source="image.jpg" description="My Image">
<picture src="image.jpg" alt="My Image">
<image href="image.jpg" text="My Image">
Which HTML tag is used to define the structure of an HTML document, including the document title and links to external resources?
<meta>
<title>
<head>
<structure>
What is the purpose of the HTML <meta> tag, and what does it typically contain?
To define a section of the HTML document.
To specify the character encoding of the document.
To create hyperlinks.
To insert images.
What is the role of the HTML <DOCTYPE> declaration in a web page?
It defines the style of the web page.
It specifies the title of the page.
It informs the browser which version of HTML is being used.
It is used to create forms.
How do you comment out multiple lines in HTML?
<!-- This is a comment -->
/* This is a comment */
// This is a comment //
-- This is a comment --
How can you make a hyperlink open in a new browser tab or window?
Use the <newwindow> attribute.
Set the target attribute of the <a> tag to "_blank".
Wrap the link in a <newtab> element.
Use the newtab CSS class.
How do you create a responsive web design in HTML and CSS?
By using JavaScript to detect the screen size and adjust elements accordingly.
By specifying fixed pixel widths for all elements on the page.
By using media queries in CSS to adapt the layout and styling based on the device's screen size.
By including multiple versions of the same website for different screen sizes.
In HTML, what is the primary purpose of the id attribute?
To group multiple elements together for styling.
To apply a unique identifier to a single element.
To link to an external stylesheet.
To create hyperlinks within a page.
Which of the following statements about the class attribute in HTML is correct?
The class attribute is used to specify a unique identifier for an element.
The class attribute can only be used once in an HTML document.
The class attribute is used to assign one or more class names to an element, allowing multiple elements to share the same styles.
The class attribute is used to define a new CSS rule.
What happens if you assign the same id to multiple HTML elements in the same document?
It's a best practice and should be done for consistency.
The document becomes invalid and will not render in a web browser.
It will lead to conflicts and is not allowed; each id must be unique.
It will combine the elements into a single element.
In HTML and CSS, which property is used to control the order of the elements when they overlap?
element-z-index
z-layer
order
z-index
Which term is commonly used to describe the process of adapting a website's layout and design to display correctly on various devices and screen sizes?
Web hosting
Web optimization
Responsive web design
Web encryption
What does HTTP stand for in the context of web development?
Hyper Text Transfer Protocol
High-Level Text Technology Protocol
Hyperlink Text Transmission Protocol
Hypertext Transfer Transmission Protocol
What is the primary purpose of the Document Object Model (DOM) in web development?
To define the structure and content of a web page.
To provide a way for web pages to interact with web servers.
To enable dynamic and interactive access and manipulation of HTML and XML documents
To store data on the client's device.
Which web development practice is essential for optimizing a website's visibility on search engines like Google?
Responsive design
Social media marketing
Search engine optimization (SEO)
Web hosting
In the context of web browsers, what does the term "tab" refer to?
A small, rectangular device for pointing to objects on a screen.
A part of a webpage where content is displayed.
A separate, browser window within a single browser instance used for browsing multiple webpages simultaneously
The address of a website.
What does a "cookie" in web browsers refer to?
A small, sweet treat served on some websites.
A type of computer virus.
A piece of data that a website sends to the user's device and is stored in their browser to remember information and user preferences
A type of browser extension.
What is the primary purpose of a web hosting service?
To register domain names.
o design and develop websites.
To provide a server or space for storing and serving website files on the internet
To manage email accounts.
Which of the following is a valid URL format?
What does the autocomplete attribute in HTML forms control?
It specifies the type of input field.
It enables or disables the browser's autocomplete feature for the input field
It sets the form's action URL.
It defines the maximum length of input data.
In HTML, which attribute is used to provide a short hint or description about an input element when the user hovers over it?
hint
placeholder
description
tooltip
