1.
What does HTML stand for?
Correct Answer
A. Hyper Text Markup Language
Explanation
HTML stands for Hyper Text Markup Language. It is a standard markup language used for creating web pages and applications. HTML uses tags to structure the content and define the layout of a web page. It is the foundation of the World Wide Web and is used to create the structure and appearance of websites.
2.
Who is making the Web standards?
Correct Answer
C. The World Wide Web Consortium
Explanation
The World Wide Web Consortium (W3C) is responsible for making the Web standards. W3C is an international community that develops open standards to ensure the long-term growth of the Web. It consists of member organizations, including major technology companies, academic institutions, and individuals who collaborate to create and maintain these standards. The involvement of various stakeholders ensures that the standards are comprehensive, inclusive, and widely adopted, leading to a more consistent and interoperable Web experience for users across different platforms and devices.
3.
Choose the correct HTML tag for the largest heading
Correct Answer
B. H1
Explanation
The correct HTML tag for the largest heading is h1. This tag is used to define the most important heading on a webpage, typically the main title or heading. It is the largest and most prominent heading tag in HTML, with h2, h3, h4, h5, and h6 being progressively smaller headings. The "head" tag is used to define the head section of an HTML document, while "h6" is the smallest heading tag. "Heading" is not a valid HTML tag.
4.
What is the correct HTML tag for inserting a line break?
Correct Answer
D. <br>
Explanation
The correct HTML tag for inserting a line break is <br>. This tag is a fundamental HTML element used to break text into a new line without creating a new paragraph or adding extra spacing. Unlike most HTML tags, <br> is an empty or self-closing tag, meaning it does not require an opening and closing pair. It is commonly used within paragraphs, lists, or any text content where a single line break is needed to improve readability or format content. Proper usage of <br> ensures that the text layout remains clean and organized. It's important to note that in XHTML or HTML5, the <br> tag can also be written as <br /> for compliance with XML syntax, but just <br> is universally supported and widely used in HTML documents.
5.
Choose the correct HTML tag to make a text bold.
Correct Answer
B. B
Explanation
The <b> tag is an HTML element used to make text bold without any additional emphasis or importance. It's often used for stylistic purposes to highlight words or phrases visually. Alternatively, you can use the <strong> tag, which also makes text bold but adds semantic importance, indicating that the content should be emphasized more strongly by screen readers and search engines.
6.
Choose the correct HTML tag to make a text italic.
Correct Answer
B. I
Explanation
The <i> tag is used in HTML to display text in an italic style. It is typically used for stylistic purposes, such as to emphasize a word or phrase or to denote titles of works. An alternative is the <em> tag, which also italicizes text but conveys emphasis and is more meaningful for accessibility and search engines.
7.
What is the correct HTML for creating a hyperlink?
Correct Answer
B. A href="http://www.w3schools.com">W3Schools
Explanation
The correct HTML for creating a hyperlink is "a href="http://www.w3schools.com">W3Schools". This code creates a hyperlink that links to the URL "http://www.w3schools.com" and displays the text "W3Schools" as the clickable link.
8.
How can you create an e-mail link?
ExplanationTo create an email link, you need to use the HTML anchor tag () with the href attribute set to "mailto:
[email protected]". This tells the browser to open the default email client with a new message addressed to the specified email address (
[email protected]) when the link is clicked.
9.
How can you open a link in a new browser window?
Correct Answer
A. A href="url" target="_blank"
Explanation
To open a link in a new browser window, you can use the "target" attribute with the value "_blank" in the anchor tag. This attribute specifies where to open the linked document, and "_blank" indicates that the link should be opened in a new window or tab. So, the correct answer is "a href="url" target="_blank"."
10.
How can you make a list that lists the items with numbers?
Correct Answer
A. Ol
Explanation
The ol tag stands for "ordered list" and is used to create a list with items that are numbered sequentially. Each item within an ordered list is marked with the li (list item) tag. The list will automatically display numbers (1, 2, 3, etc.) for each item. Other tags like ul are used for unordered lists with bullets, and dl is for description lists. The list tag does not exist in HTML.
11.
How can you make a list that lists the items with bullets?
Correct Answer
A. Ul
Explanation
The ul tag stands for "unordered list" and is used to display a list of items with bullet points. Each item in the list is marked with the li (list item) tag. Unlike ol, which creates a numbered list, ul provides a list format with bullets for each item. The tags dl and list are not used for creating bulleted lists; dl is for description lists, and list is not a valid HTML tag.
12.
What is the correct HTML for inserting an image?
Correct Answer
C. Img src="image.gif" alt="MyImage"
Explanation
The correct HTML for inserting an image is "img src="image.gif" alt="MyImage"". This code includes the "img" tag, which is used to insert images in HTML, and the "src" attribute, which specifies the source or location of the image file. The "alt" attribute is used to provide alternative text for the image, which is displayed if the image cannot be loaded.
13.
How can you make a list that lists the items without bullets or numbers?
Correct Answer
C. Dl
Explanation
The correct answer is "dl". The "dl" tag is used to create a definition list in HTML, which lists items without bullets or numbers. It consists of a series of terms (dt) and their corresponding definitions (dd). Unlike ordered (ol) and unordered (ul) lists, which use numbers and bullets respectively, the definition list does not have any visual markers.
14.
What is the name of every homepage on the WWW?
Correct Answer
B. Index.html
Explanation
The correct answer is "index.html" because "index.html" is a commonly used filename for the homepage of a website on the World Wide Web. It is a standard convention that many web servers and content management systems follow to designate the main page of a website as "index.html".
15.
The is doctype mandatory.
Correct Answer
A. True
Explanation
The doctype declaration is mandatory in HTML documents. It is used to specify the version of HTML being used and ensures that the document is rendered correctly by web browsers. Without the doctype declaration, the browser may enter "quirks mode" and interpret the HTML code differently, leading to inconsistent rendering across different browsers. Therefore, it is essential to include the doctype declaration at the beginning of an HTML document.
16.
What does CSS stand for?
Correct Answer
D. Cascading Style Sheets
Explanation
CSS stands for Cascading Style Sheets. It is a style sheet language used for describing the look and formatting of a document written in HTML. CSS allows web designers to control the appearance of multiple web pages by applying styles to elements on the page. It provides a way to separate the presentation of a document from its structure, making it easier to maintain and update the design of a website.
17.
What is the correct HTML for referring to an external style sheet?
Correct Answer
B. Link rel="stylesheet" type="text/css" href="mystyle.css"
Explanation
The correct HTML for referring to an external style sheet is "link rel="stylesheet" type="text/css" href="mystyle.css"". This is because the "link" tag is used to define a link between a document and an external resource, in this case, a style sheet. The "rel" attribute specifies the relationship between the current document and the linked resource, and the "type" attribute specifies the type of the linked resource, which is "text/css" for a style sheet. Finally, the "href" attribute specifies the URL or file path of the linked resource, in this case, "mystyle.css".
18.
Which of the following CSS properties is used to control the spacing between letters in a text?
Correct Answer
B. Letter-spacing
Explanation
The letter-spacing property in CSS allows you to adjust the space between individual characters in a text element. This can be useful for creating visual effects or improving readability in certain situations. The other options control different aspects of text formatting: line-height adjusts the vertical spacing between lines of text, word-spacing controls the spacing between words, and text-indent indents the first line of a text block.
19.
How do you insert a comment in a CSS file?
Correct Answer
B. /* this is a comment */
Explanation
To insert a comment in a CSS file, you use the syntax /* comment */. This allows you to add notes or explanations within the CSS code without affecting the styling or functionality of the webpage. The other options mentioned, such as using // or ' to indicate a comment, are not valid in CSS.
20.
Which property is used to change the background color?
Correct Answer
B. Background-color:
Explanation
The property used to change the background color is "background-color". This property allows you to specify a color value that will be applied to the background of an element. By using this property, you can easily change the background color of a webpage or an element within it.
21.
Which of the following CSS properties is used to change the text color of an HTML element?
Correct Answer
A. Color
Explanation
In CSS, the color property is used to set the color of the text content for an HTML element. This property can accept color names, hexadecimal color codes, RGB values, RGBA values, etc. The other options listed (font-color, text-color, and text-style) are not valid CSS properties.
22.
How do you change the text color of an element?
Correct Answer
A. Color:
Explanation
The correct answer is "color:". This CSS property is used to change the text color of an element. It allows you to specify a color value using keywords, hexadecimal codes, RGB values, or HSL values. By setting the "color" property to a desired color value, you can change the text color of an element on a webpage.
23.
Which CSS property controls the text size?
Correct Answer
D. Font-size
Explanation
The CSS property that controls the text size is "font-size". This property allows you to specify the size of the text content within an element. By using different values such as pixels, percentages, or em units, you can adjust the text size to your desired preference.
24.
What is the correct CSS syntax for making all the
elements bold?
Correct Answer
A. P { font-weight: bold; }
Explanation
The correct CSS syntax for making all the
elements bold is "p { font-weight: bold; }". The "font-weight: bold" property sets the font weight to bold, which makes the text appear thicker and darker.
25.
How do you display hyperlinks without an underline?
Correct Answer
A. A {text-decoration:none}
Explanation
The correct answer is "a {text-decoration:none}". This CSS code is used to remove the underline from hyperlinks. The "text-decoration" property is used to set the decoration of text, and the value "none" specifies that no decoration should be applied, including the underline.
26.
How do you change the font of an element?
Correct Answer
A. Font-family:
Explanation
The font-family property is used to change the font of an element. It allows you to specify a list of fonts, in order of preference, that should be used for the text content of the element. The browser will use the first font in the list that it supports.
27.
How do you make the text bold in CSS?
Correct Answer
A. Font-weight:bold
Explanation
To make text bold in CSS, you use the font-weight property. This property controls the thickness or weight of the text. Setting font-weight to bold will make the text appear thicker and more prominent than the normal text weight. The font-weight property can take several values, such as normal, bold, bolder, lighter, or numerical values (100 to 900). For instance, font-weight: bold; specifically applies a bold font weight to the selected text. This is a standard approach for emphasizing text in web design, ensuring clarity and visual hierarchy.
28.
How do you change the left margin of an element?
Correct Answer
A. Margin-left:
Explanation
To change the left margin of an element, you can use the CSS property "margin-left". This property allows you to specify the amount of space between the left edge of the element and its surrounding elements. By setting a value for "margin-left", you can adjust the position of the element horizontally within its container.
29.
To define the space between the element's border and content, you use the padding property, you are allowed to use negative values?
Correct Answer
B. False
Explanation
The statement is false because you are not allowed to use negative values for the padding property. The padding property defines the space between an element's border and its content, and it is always a non-negative value. Using a negative value for padding would result in an invalid CSS declaration.
30.
How do you make a list that lists its items with squares?
Correct Answer
D. List-style-type: square
Explanation
The list-style-type property in CSS specifies the type of bullet or marker used for list items. Setting list-style-type: square; will display square-shaped bullets for an unordered list (ul). Other possible values for list-style-type include disc (default bullet), circle, none, and more. The options type: square, list-type: square, and type: 2 are not valid CSS properties for styling list items.
31.
Where in an HTML document is the correct place to refer to an external style sheet?
Correct Answer
A. In the head section
Explanation
The correct place to refer to an external style sheet in an HTML document is in the head section. This is because the head section is used to define meta-information about the document, such as the title, character encoding, and external resources like style sheets. Placing the reference to the external style sheet in the head section ensures that it is loaded and applied before the content of the document is rendered, allowing for consistent and uniform styling throughout the entire page.