What required <form> attribute specifies the manner in which the browser will send form data to a web server?
Correct answer:
B) Method
Explanation: The method attribute defines how data will be sent to the server, either as a GET or POST request.
What required <form> attribute specifies the manner in which the browser will send form data to a web server?
Correct answer:
B) Method
Explanation: The method attribute defines how data will be sent to the server, either as a GET or POST request.
This required <form> attribute specifies the name and location of the CGI script used to process the form.
Correct answer:
A) Action
Explanation: The action attribute specifies where the form data should be sent once it is submitted.
What <form> method attribute value instructs the browser to append the form data to the URL for use in a query string?
Correct answer:
A) Get
Explanation: The get method appends form data to the URL, allowing it to be used in query strings.
What <form> method attribute value allows sending more characters and is slightly more secure when submitting a web-based form?
Correct answer:
B) Post
Explanation: The post method allows larger amounts of data and is more secure than get because the data is not exposed in the URL.
In HTML, what is a container?
Correct answer:
A) A part of the document body with opening and closing tags
Explanation: A container is an HTML element that has both opening and closing tags and can contain other elements.
In HTML, what is a parent container?
Correct answer:
A) A container in which another element resides
Explanation: A parent container is an HTML element that contains another element within its opening and closing tags.
Which of the following HTML elements are containers?
Correct answer:
B) <footer>, <header>, <section>, <span>
Explanation: These elements act as containers that define different sections or parts of a webpage.
Which HTML element is a block element with no semantic meaning?
Correct answer:
B) <div>
Explanation: The <div> element is a block-level container with no semantic meaning, used for layout purposes.
What type of HTML element fills the minimum space possible in the parent container and can only contain text or other inline elements?
Correct answer:
B) Inline Element
Explanation: Inline elements take up only the necessary space and can contain text or other inline elements.
What is the generic HTML element that creates inline containers and has no semantic meaning?
Correct answer:
B) <span>
Explanation: The <span> element is used to group inline elements, without giving them any semantic meaning.
What types of elements can be inside a block element?
Correct answer:
C) Both inline and block elements
Explanation: Block elements can contain both inline and block elements.
What types of elements can be inside an inline element?
Correct answer:
B) Only inline elements
Explanation: Inline elements can only contain other inline elements or text.
What HTML element is used to facilitate information gathering for submission to a server?
Correct answer:
C) <form>
Explanation: The <form> element is used to collect user input for submission to a server.
Which HTML attribute should be used if a <form> field contains binary data that the normal format of the query string is not sufficient to encode?
Correct answer:
C) Enctype
Explanation: The enctype attribute defines how form data should be encoded when submitted to the server.
Which of the following are primary attributes for an <input> element?
Correct answer:
A) Id, name, type, value, placeholder
Explanation: These are the main attributes used to define an <input> elements behavior.
What is the <input> type attribute value for a text box widget?
Correct answer:
C) Text
Explanation: The text value defines a simple text box input field.
Which HTML element should be used to produce a submit button in a form?
Correct answer:
B) <input>
Explanation: The <input> element with type="submit" is used to create a submit button in a form.
Which <input> attribute allows the input to start with a default value?
Correct answer:
C) Value
Explanation: The value attribute is used to set the default value of an <input> field.
Which <input> attribute provides a hint to the user about the information being requested?
Correct answer:
B) Placeholder
Explanation: The placeholder attribute displays a hint to the user within the input field before any text is entered.
Which attribute inside the <label> element is used to associate the label with a widget?
Correct answer:
B) For
Explanation: The for attribute associates a label with an input element by its ID.
True or false: An <option> element must have a value attribute.
Correct answer:
B) False
Explanation: The value attribute is not required for an <option> element, although it is good practice to include it.
Which HTML element can create a button with an image?
Correct answer:
B) <button>
Explanation: The <button> element can contain images and text, making it more versatile than the <input> element.
Which of the following are valid <input> types for entering specific types of text?
Correct answer:
B) Email, search, tel, url
Explanation: These are the specific <input> types used to enter data in email, search, telephone, and URL formats.
Which of the following audio formats are supported by nearly all web browsers?
Correct answer:
B) AAC, MP3
Explanation: AAC and MP3 are widely supported audio formats in most web browsers.
Which of the following is the correct HTML syntax for referring to an external style sheet?
Correct answer:
B) <link rel="stylesheet" href="mystyle.css">
Explanation: The correct syntax includes the rel="stylesheet" attribute in the <link> tag.
Where in an HTML document is the correct place to refer to an external style sheet?
Correct answer:
A) In the <head> section
Explanation: External style sheets should be linked in the <head> section of an HTML document.
Which HTML tag is used to define an internal style sheet?
Correct answer:
A) <style>
Explanation: The <style> tag is used within the <head> section to define internal CSS.
Which HTML attribute is used to define inline styles?
Correct answer:
B) Style
Explanation: The style attribute is used to apply inline CSS to HTML elements.
Which of the following is the correct CSS syntax to set text color to black for all <body> elements?
Correct answer:
A) body {color: black;}
Explanation: The color property in CSS is used to set the text color.
How do you insert a CSS comment?
Correct answer:
B) /* this is a comment */
Explanation: CSS comments are enclosed within /* and */.
Which CSS property is used to change the background color of an element?
Correct answer:
C) Background-color
Explanation: The background-color property is used to set the background color of an element.
Which property is used to add a background color to <h1> elements?
Correct answer:
B) background-color
Explanation: The background-color property applies a background color to elements, including <h1>.
Which CSS property is used to change the text color of an element?
Correct answer:
C) Color
Explanation: The color property in CSS sets the text color of an element.
Which CSS property controls the text size?
Correct answer:
A) Font-size
Explanation: The font-size property adjusts the size of text in an element.
Which CSS syntax makes all <p> elements bold?
Correct answer:
A) p {font-weight: bold;}
Explanation: The font-weight property controls the thickness (boldness) of text.
How do you display hyperlinks without an underline in CSS?
Correct answer:
A) a {text-decoration: none;}
Explanation: The text-decoration property is used to remove or apply text decorations, such as underlining.
How do you make each word in a text start with a capital letter using CSS?
Correct answer:
C) text-transform: capitalize;
Explanation: The text-transform: capitalize; CSS property makes the first letter of each word uppercase.
Which property is used to change the font of an element in CSS?
Correct answer:
A) Font-family
Explanation: The font-family property defines which font is applied to the text within an element.
How do you make text bold using CSS?
Correct answer:
A) Font-weight: bold;
Explanation: The font-weight property controls the boldness of the text.
How do you display a border on all sides of an element in CSS?
Correct answer:
B) Border: 1px solid black;
Explanation: The shorthand border property defines the width, style, and color of a border.
How do you change the left margin of an element in CSS?
Correct answer:
B) Margin-left
Explanation: The margin-left property sets the space between the element's left border and surrounding elements.
Which HTML element is used to define the largest heading on a page?
Correct answer:
D) <h1>
Explanation: The <h1> element defines the highest-level (largest) heading. Headings run from <h1> down to <h6>, and using them in order gives a page a clear, accessible document structure.
Which CSS property is used to change the text color of an element?
Correct answer:
A) color
Explanation: The color property sets the color of an element's text. The background-color property sets the area behind the content, not the text itself.
What does the 'alt' attribute on an <img> tag provide?
Correct answer:
B) Alternative text describing the image for accessibility
Explanation: The alt attribute supplies alternative text describing the image. Screen readers announce it to visually impaired users, and browsers display it if the image fails to load.
In CSS, which selector targets an element by its id attribute?
Correct answer:
C) #idname
Explanation: The hash symbol (#) selects an element by its id, as in #header. A period (.) selects by class, and an element name alone selects all elements of that type.
Which HTML element creates an unordered (bulleted) list?
Correct answer:
D) <ul>
Explanation: The <ul> element creates an unordered, bulleted list, with each item wrapped in <li>. The <ol> element creates an ordered, numbered list instead.
What is the correct HTML element for creating a hyperlink?
Correct answer:
A) <a>
Explanation: The <a> (anchor) element creates a hyperlink, using the href attribute to specify the destination. The <link> element is used in the <head> to reference external resources such as stylesheets.
Which CSS box model property adds space outside an element's border?
Correct answer:
B) margin
Explanation: Margin is the space outside an element's border, separating it from neighboring elements. Padding is the space between the content and the border, inside the element.
What is the purpose of the <!DOCTYPE html> declaration?
Correct answer:
C) It tells the browser the document is HTML5
Explanation: The <!DOCTYPE html> declaration tells the browser to render the page using HTML5 standards mode, ensuring consistent, standards-compliant behavior across browsers.
Which attribute specifies the destination URL of a hyperlink?
Correct answer:
D) href
Explanation: The href (hypertext reference) attribute of an <a> element specifies the URL the link points to. The src attribute is used by elements like <img> and <script> to load a resource.
If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.