Unit 1 - Practice Quiz

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

1 What does HTML stand for?

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

2 Which organization is responsible for standardizing HTML?

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

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

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

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

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

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

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

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

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

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

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

8 Which tag represents the most important heading?

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

9 Which tag is used to define a paragraph?

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

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

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

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 header row
D. A hidden reference

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

23 Which tag is used for short, inline quotations?

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

24 How do you write a comment in HTML?

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

25 What characterizes a 'Paired Tag' in HTML?

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

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

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

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

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

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

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

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. Paired
C. Both
D. Neither

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

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

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

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

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

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

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

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

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

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

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

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

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

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

38 The <head> tag is a container for:

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

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

A. Makes the text bold
B. Links to the website
C. Shows 'World Health Organization' as a tooltip on hover
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. <title>
D. <book>

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. <b>
C. <mark>
D. <em>

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

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

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

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

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

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

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

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

46 Why are comments used in HTML code?

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

47 The <br> tag stands for:

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

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

A. <def>
B. <dd>
C. <dfn>
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. <tr >
B. <line>
C. <break>
D. <hr>