













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














































































IT & Cybersecurity Exam coverage:
document type and root element for an HTML5 document? A. followed by B. followed by C. followed by D. followed by CORRECT ANSWER: B RATIONALE: In HTML5, the document type declaration is simplified to , which is case-insensitive and tells the browser to render the page in standards mode. The element is the root element that encloses all content. Options A and D are for older HTML versions or XHTML, while option C is for XML documents. Question 2 A developer wants to organize the main navigation links for a website. Which HTML5 semantic element is most appropriate for containing the primary navigation menu? A. B. C. D. CORRECT ANSWER: C RATIONALE: The element is a semantic HTML5 element specifically designed to contain major navigation links for a
document in a new browser tab. Which attribute and value should be used with the tag? A. target="_self" B. target="_blank" C. target="_parent" D. target="_top" CORRECT ANSWER: B RATIONALE: The target="_blank" attribute value instructs the browser to open the linked document in a new tab or window. _self opens in the same frame, _parent opens in the parent frameset, and _top opens in the full body of the window. Question 5 Which HTML tag is used to define an unordered list with bullet points, and which tag is used for each list item? A. and B. and C. and D. and CORRECT ANSWER: A RATIONALE: defines an unordered (bulleted) list, and defines each list item within the list. defines an ordered (numbered) list. and are not valid HTML elements.
Question 6 A developer needs to display a block of text exactly as it is formatted in the HTML source code, preserving spaces and line breaks. Which HTML tag should be used? A. B. C. D.
CORRECT ANSWER: B RATIONALE: The
(preformatted text) element displays text exactly as it is defined in the HTML markup, preserving white spaces and line breaks. is for inline code snippets, is for sample output, andis for paragraphs that collapse white spaces. Question 7 A developer is adding an image to a webpage and wants to ensure that users with visual impairments or slow internet connections understand what the image represents. Which attribute should be added to the tag? A. title B. src C. alt D. longdesc CORRECT ANSWER: C
C. D. **CORRECT ANSWER:** B **RATIONALE:** The element, placed within the <head> section, defines the webpage title displayed in the browser tab and used by search engines. <head> contains meta-information, <header> is a semantic element for page headers, and <h1> is the main heading displayed on the page. **Question 10** A developer wants to comment out a section of HTML code so that it does not render in the browser. Which syntax is correct for an HTML comment? A. // This is a comment B. /* This is a comment */ C. <!-- This is a comment --> D. # This is a comment **CORRECT ANSWER:** C **RATIONALE:** In HTML, comments are written as <!-- comment -- >. The browser ignores everything between these markers. // is used for single-line comments in JavaScript and CSS, /* */ is for multi-line comments in CSS and JavaScript, and # is for comments in CSS preprocessors.Question 11 Which HTML element is used to define the main heading of a webpage and is typically the largest heading level? A. B. C. D. CORRECT ANSWER: C RATIONALE: <h1> defines the most important heading on a page, typically the main title. It should be used once per page for SEO and accessibility. <h6> is the smallest heading, <header> is a container for introductory content, and <title> is not displayed on the page itself. Question 12 A developer is creating a form and needs to create a text input field that masks the characters as they are typed, such as for a password. Which type attribute value should be used? A. type="text" B. type="password" C. type="hidden" D. type="secure" CORRECT ANSWER: B RATIONALE: The type="password" attribute creates a text input field where characters are masked (displayed as dots or asterisks) for security. text displays characters
C. Email Us D. Email Us CORRECT ANSWER: A RATIONALE: The mailto: scheme is used in the href attribute to create an email link. When clicked, it opens the user's default email client with the specified address. The other options use invalid or non-standard schemes. Question 15 Which HTML tag is used to define a hyperlink that connects one webpage to another? A. B. C. D. CORRECT ANSWER: C RATIONALE: The (anchor) tag is used to create hyperlinks to other webpages, files, or locations within the same page. is used in the to link external resources like stylesheets, is an attribute not an element, and is a container for navigation links. Question 16 A developer is building a webpage and wants to include a footer
at the bottom containing copyright information. Which semantic element should be used? A. B. C. D. CORRECT ANSWER: B RATIONALE: is a semantic HTML5 element that represents a footer for its nearest sectioning content or sectioning root. It typically contains information about the author, copyright, or links to related documents. and are not valid HTML elements. Question 17 Which HTML attribute is used to specify the character encoding of an HTML document to ensure proper display of text? A. B. C. Both A and B are valid D. UTF-8 CORRECT ANSWER: C RATIONALE: Both (HTML5) and (older HTML) are valid ways to specify character encoding.
RATIONALE: The element represents a section of a page that contains content tangentially related to the content around it, often used for sidebars, pull quotes, or advertising. groups related content, is not a standard HTML element, and is non-semantic. Question 20 A developer is writing HTML and wants to include a horizontal rule to visually separate content sections. Which tag should be used? A. B. C. D. CORRECT ANSWER: B RATIONALE: The (horizontal rule) tag creates a thematic break or horizontal line separating content. It is a void element. and are not valid HTML elements, and creates a line break, not a horizontal rule. Question 21 Which HTML attribute is used to define inline styles directly on an element, overriding external and internal stylesheets?
A. class B. id C. style D. css CORRECT ANSWER: C RATIONALE: The style attribute is used to apply inline CSS directly to an HTML element. It has the highest specificity and overrides external and internal stylesheets. class and id are used for CSS selectors, and css is not a valid attribute. Question 22 A developer needs to create a dropdown list of options for a form. Which HTML elements are used together to create this? A. and and RATIONALE: The X-UA-Compatible meta tag with content="IE=edge" tells Internet Explorer to use the latest available rendering engine, ensuring the page is displayed using the most modern standards support. This is especially important for ensuring compatibility in older versions of IE. Question 25 Which HTML element is used to group related form elements together and visually distinguish them, often with a border? A. B. C. D. CORRECT ANSWER: B RATIONALE: is used to group related form controls and labels, visually distinguishing them with a border. It is often paired with to provide a caption for the group. contains the entire form, is not a standard element, and is for content sections. Section 2: CSS Fundamentals & Styling (Questions 26–50) Question 26 A developer is styling a webpage and wants to apply a CSS rule that has the highest priority and overrides all other style
declarations. Which directive should be used? A. !override B. !important C. @import D. !priority CORRECT ANSWER: B RATIONALE: The !important directive, when added to a CSS property value, overrides normal cascading rules and gives that declaration the highest priority. !override and !priority are not valid CSS directives. @import is used to import external stylesheets. Question 27 Given the following CSS rules, what color will the paragraph text display? p { color: red; } p { color: yellow; } p { color: green; } p { color: purple; } A. Red B. Yellow C. Green D. Purple CORRECT ANSWER: D RATIONALE: In CSS, when multiple rules of the same specificity apply to the same element, the last rule in the cascade takes
C. image: url('paper.gif') D. bg-image: url('paper.gif') CORRECT ANSWER: B RATIONALE: The background-image property is used to set a background image for an element. The value is url('path/to/image'). background is a shorthand property that can also set background-image, but background-image is more specific. image and bg-image are not valid CSS properties. Question 30 A developer wants to specify the left or right alignment of an image within its containing element. Which CSS property should be used? A. text-align B. float C. align D. position CORRECT ANSWER: B RATIONALE: The float property is used to specify the left or right alignment of an element, allowing text to wrap around it. text- align aligns inline content within a block, align is not a standard CSS property for alignment, and position is used for positioning elements in the document flow.
Question 31 Which CSS property controls the transparency of an element, with a value of 1.00 representing completely opaque? A. transparency B. opacity C. filter D. alpha CORRECT ANSWER: B RATIONALE: The opacity property controls the transparency of an element. A value of 1.00 (or 1 ) represents completely opaque, 0 is completely transparent, and values between 0 and 1 represent partial transparency. transparency is not a valid CSS property. Question 32 A developer is styling a webpage and wants to apply a style only to elements that have a specific class attribute. Which CSS selector should be used? A. #classname B. .classname C. *classname D. element.classname CORRECT ANSWER: B RATIONALE: The class selector, denoted by a period (.) followed by the class name, selects all elements with that class attribute. # is for ID selectors, * is the universal selector,