Unit 1 - Practice Quiz

CSE326 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 What does HTML stand for?

A. Hyper Text Markup Language
B. Hyper Text Manipulation Language
C. Hyper Tool Multi Language
D. Hyper Text Processing Language

2 Which organization is responsible for standardizing HTML?

A. Microsoft
B. Google
C. Mozilla
D. W3C (World Wide Web Consortium)

3 Which tag is considered the root element of an HTML document?

A. <root>
B. <head>
C. <body>
D. <html>

4 What is the primary function of the <!DOCTYPE html> declaration?

A. To link CSS files
B. To tell the browser which version of HTML the page is using
C. To create a title for the page
D. To close the HTML document

5 Where should metadata, such as the page title and character set, be placed in an HTML document?

A. Inside the <body> tag
B. Inside the <footer> tag
C. Inside the <head> tag
D. After the </html> tag

6 Which HTML tag is used to define the visible content of a web page?

A. <head>
B. <body>
C. <content>
D. <main>

7 How many levels of heading tags are available in HTML?

A. 5
B. 6
C. 4
D. Unlimited

8 Which tag represents the most important heading?

A. <head>
B. <h1>
C. <header>
D. <h6>

9 Which tag is used to define a paragraph?

A. <text>
B. <pg>
C. <p>
D. <para>

10 What is the correct tag to insert a line break without starting a new paragraph?

A. <lb>
B. <newline>
C. <br>
D. <break>

11 What does the <hr> tag define in HTML5?

A. A thematic break in the content
B. A horizontal ruler for decoration only
C. A hidden reference
D. A header row

12 Which of the following is an example of an unpaired (void) tag?

A. <p>
B. <h1>
C. <b>
D. <br>

13 Which tag is used to define important text, typically displayed in bold?

A. <strong>
B. <imp>
C. <b>
D. <bold>

14 What is the semantic difference between <b> and <strong>?

A. <b> implies importance, <strong> is just stylistic
B. There is no difference
C. <strong> implies semantic importance, <b> is just stylistic
D. <b> creates a larger font than <strong>

15 Which tag is used to emphasize text, typically displaying it in italics?

A. <italic>
B. <em>
C. <sl>
D. <i>

16 Which HTML element defines text that should be marked or highlighted?

A. <highlight>
B. <strong>
C. <hl>
D. <mark>

17 What is the purpose of the <small> tag?

A. To create a subscript
B. To define smaller text, often used for copyright or side comments
C. To shrink the container size
D. To create a thumbnail image

18 Which tag is used to define an abbreviation or acronym?

A. <short>
B. <abb>
C. <abbr>
D. <acr>

19 Which attribute is commonly used with <abbr> to show the full definition on hover?

A. href
B. src
C. title
D. alt

20 Which tag defines the title of a creative work (e.g., a book or movie)?

A. <ref>
B. <cite>
C. <work>
D. <title>

21 What is the purpose of the <dfn> tag?

A. To display a default number
B. To define the defining instance of a term
C. To delete text
D. To define a function

22 Which tag is used for a section that is quoted from another source (usually a block of text)?

A. <q>
B. <quote>
C. <citation>
D. <blockquote>

23 Which tag is used for short, inline quotations?

A. <cite>
B. <quotation>
C. <q>
D. <blockquote>

24 How do you write a comment in HTML?

A. // This is a comment
B. <!-- This is a comment -->
C. <comment> This is a comment </comment>
D. / This is a comment /

25 What characterizes a 'Paired Tag' in HTML?

A. It only has an opening tag
B. It must strictly be paired with CSS
C. It has both an opening and a closing tag
D. It cannot contain attributes

26 Which of the following is a main characteristic of Block-level elements?

A. They are used only for images
B. They cannot contain other elements
C. They always start on a new line
D. They only take up as much width as necessary

27 Which of the following is a main characteristic of Inline elements?

A. They start on a new line
B. They take up the full width of the page
C. They cannot contain text
D. They only take up as much width as necessary

28 Which of the following is a Block-level element?

A. <span>
B. <div>
C. <a>
D. <em>

29 Which of the following is an Inline element?

A. <ul>
B. <span>
C. <p>
D. <h1>

30 Is the <img> tag paired or unpaired?

A. Unpaired
B. Neither
C. Paired
D. Both

31 Which element is strictly required to appear within the <head> section?

A. <title>
B. <p>
C. <h1>
D. <img>

32 What happens if you do not close a paired tag like <p> in HTML5?

A. The page will crash
B. The browser will try to guess where to close it, potentially causing layout issues
C. The text will disappear
D. An error message pops up

33 Can a block-level element contain an inline element?

A. No, never
B. Yes, always
C. Only in the <head>
D. Only if it is an image

34 Can an inline element contain a block-level element?

A. Yes, always
B. Generally no, with some exceptions in HTML5
C. Only if using CSS
D. No, it creates a syntax error

35 Which tag is used to display text exactly as it is written, preserving spaces and line breaks?

A. <hr>
B. <br>
C. <pre>
D. <p>

36 What does the 'charset' attribute in the <meta> tag define?

A. The author name
B. The font style
C. The page description
D. The character encoding

37 Which of the following tags is semantically appropriate for emphasizing a warning or alert in text?

A. <i>
B. <span>
C. <strong>
D. <b>

38 The <head> tag is a container for:

A. Footers
B. Visible content
C. Metadata
D. Headings h1-h6

39 In the context of <abbr title='World Health Organization'>WHO</abbr>, what does the title attribute do?

A. Shows 'World Health Organization' as a tooltip on hover
B. Links to the website
C. Makes the text bold
D. It does nothing

40 Which tag would you use to reference the title of a book within a paragraph?

A. <cite>
B. <ref>
C. <book>
D. <title>

41 If you want to highlight a specific part of the text because of its relevance in a search result, which tag should be used?

A. <strong>
B. <mark>
C. <em>
D. <b>

42 Which HTML version introduced semantic tags like <mark> and <time>?

A. XHTML
B. HTML 2.0
C. HTML5
D. HTML 4.01

43 What is the default display behavior of the <h1> tag?

A. Flex
B. Hidden
C. Inline
D. Block-level

44 What is the default display behavior of the <strong> tag?

A. None
B. Inline
C. Block-level
D. Grid

45 Which tag serves as the container for all other HTML elements except the <!DOCTYPE>?

A. <main>
B. <html>
C. <head>
D. <body>

46 Why are comments used in HTML code?

A. To execute scripts
B. To help developers understand the code
C. To format the output text
D. To display messages to the user

47 The <br> tag stands for:

A. Break Ruler
B. Break Line
C. Border Radius
D. Break Row

48 Which element represents a term being defined within a description list or sentence?

A. <def>
B. <dfn>
C. <dd>
D. <dt>

49 What is the correct syntax for an attribute?

A. name='value'
B. name:value
C. {name:value}
D. name(value)

50 Which of the following elements creates a thematic break, traditionally rendered as a horizontal line?

A. <line>
B. <break>
C. <hr>
D. <tr >