0% found this document useful (0 votes)
11 views

Tutorials on Itc 2201internet and Web Programming

The document contains a series of tutorial questions and answers related to Internet and Web Programming, covering topics such as HTML, CSS, JavaScript, and HTTP. Key concepts include the definitions of various tags, attributes, and properties used in web development. It also addresses the roles of different programming languages and web technologies in creating and managing web pages.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Tutorials on Itc 2201internet and Web Programming

The document contains a series of tutorial questions and answers related to Internet and Web Programming, covering topics such as HTML, CSS, JavaScript, and HTTP. Key concepts include the definitions of various tags, attributes, and properties used in web development. It also addresses the roles of different programming languages and web technologies in creating and managing web pages.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

TUTORIALS ON ITC 2201 INTERNET AND WEB

PROGRAMMING

1. What does HTTP stand for?


a. Hypertext Transfer Protocol
b. Hyper Transfer Text Program
c. High Transfer Text Protocol
d. Hypertext Transfer Program
Answer: a) Hypertext Transfer Protocol
2. Which of the following is used to create a web page
a. CSS
b. HTML
c. Java
d. SQL
Answer: b) HTML
3. CSS is primarily used for:
a. Structuring web content
b. Adding interactivity to a website
c. Styling web pages
d. Defining server-side logic
Answer: c) Styling web pages
4. What is the primary function of JavaScript on the web
a. Structure content
b. Style content
c. Add interactivity
d. Optimize database
Answer: c) Add interactivity
5. HTML stands for:
a) Hyper Transfer Markup Language
b) Hyperlink Markup Language
c) Hypertext Transfer Language
d) Hypertext Markup Language
Answer: d) Hypertext Markup Language
6. The default file extension for HTML files is:
a) .htm
b) .html
c) .txt
d) .doc
Answer: b) .html
7. Which tag is used to create hyperlinks?
a) <a>
b) <link>
c) <href>
d) <src>
Answer: a) <a>
8. The <title> tag in HTML is used for:
a) Displaying the page title on the browser tab
b) Setting the title in the document body
c) Creating a heading
d) Defining a section title
Answer: a) Displaying the page title on the browser tab
9. Which HTML attribute specifies an image source?
a) href
b) src
c) alt
d) title
Answer: b) src
10. In CSS, which symbol is used to target an ID selector?
a) . (dot)
b) # (hash)
c) * (asterisk)
d) & (ampersand)
Answer: b) # (hash)
11. The <h1> to <h6> tags represent:
a. Paragraphs
b. Headers
c. Lists
d. Forms
Answer: b) Headers
12. JavaScript code is placed within which HTML tag?
a) <script>
b) <code>
c) <js>
d) <style>
Answer: a) <script>
13. Which HTML element is used for creating an unordered list?
A) <li>
B) <ul>
C) <ol>
D) <li>
Answer: B) <ul>
14. What is the purpose of the <br> tag in HTML?
A) Start a new paragraph
B) Create a break in text
C) Add a line
D) Display bold text
Answer: B) Create a break in text
15. Which HTTP method is commonly used to submit form data?
A) GET
B) POST
C) SEND
D) SUBMIT
Answer: B) POST
16. CSS stands for:
A) Cascading Style Sheets
B) Creative Style Sheets
C) Cascading Sheet Styles
D) Computer Style Sheets
Answer: A) Cascading Style Sheets
17. Which property is used to change the background color in CSS?
A) background-color
B) bg-color
C) color
D) bgcolor
Answer: A) background-color
18. HTML elements are defined by:
A) Tags
B) Links
C) Attributes
D) Files
Answer: A) Tags
19. The alt attribute in the <img> tag is used for:
A) Providing an alternative text
B) Setting image alignment
C) Specifying image source
D) Changing image size
Answer: A) Providing an alternative text
20. In HTML, which element is used to define a paragraph?
A) <p>
B) <h>
C) <para>
D) <text>
Answer: A) <p>
21. Which CSS property is used to change the font size?
A) font-size
B) text-size
C) size
D) font-style
Answer: A) font-size
22. The primary language used to structure web pages is:
A) HTML
B) CSS
C) JavaScript
D) SQL
Answer: A) HTML
23. In JavaScript, which keyword is used to declare a variable?
A) declare
B) var
C) def
D) set
Answer: B) var
24. Which of these is an example of a CSS class selector?
A) .button
B) #button
C) /button
D) button()
Answer: A) .button
25. To make text bold in HTML, you use:
A) <strong>
B) <b>
C) Both A and B
D) <i>
Answer: C) Both A and B
26. Which tag is used to embed video files in HTML?
A) <media>
B) <video>
C) <embed>
D) <iframe>
Answer: B) <video>
27. The box model in CSS includes:
A) Margin, border, padding, and content
B) Margin, padding, font, and content
C) Margin, border, font, and padding
D) Padding, color, width, and height
Answer: A) Margin, border, padding, and content
28. Which attribute is used to provide a title for an HTML element?
A) title
B) tooltip
C) name
D) label
Answer: A) title
29. HTML forms are created using which tag?
A) <form>
B) <input>
C) <submit>
D) <button>
Answer: A) <form>
30. Which property is used to align text in CSS?
A) text-align
B) align-text
C) justify
D) position
Answer: A) text-align
31. The <head> section of an HTML document is used for:
A) Content display
B) Metadata and links
C) Navigation
D) Scripts
Answer: B) Metadata and links
32. Which of the following is not a valid CSS position property value?
A) static
B) absolute
C) fixed
D) float
Answer: D) float
33. Which HTML tag is used to add a line across the page?
A) <hr>
B) <line>
C) <br>
D) <divider>
Answer: A) <hr>
34. HTML tables are created using which tags?
A) <table>, <tr>, <td>
B) <tab>, <row>, <column>
C) <div>, <row>, <data>
D) <table>, <row>, <data>
Answer: A) <table>, <tr>, <td>
35. Which attribute in HTML forms is used to define where data should be submitted?
A) href
B) action
C) method
D) type
Answer: B) action
36. In JavaScript, which of these symbols is used for equality comparison?
A) =
B) ==
C) ===
D) =!
Answer: B) ==
37. The <link> tag in HTML is commonly used to:
A) Link CSS files
B) Link JavaScript files
C) Add metadata
D) Add images
Answer: A) Link CSS files
38. The default method for HTML form submission is:
A) GET
B) POST
C) SUBMIT
D) SEND
Answer: A) GET
39. Which CSS property is used to change the text color?
A) color
B) text-color
C) font-color
D) text-style
Answer: A) color
40. The <body> tag in HTML is used to contain:
A) Scripts only
B) Metadata
C) Visible page content
D) Links to stylesheets
Answer: C) Visible page content
41. In JavaScript, which keyword is used to define a constant variable?
A) var
B) const
C) let
D) static
Answer: B) const
42. Which CSS property is used to create rounded corners?
A) corner-radius
B) border-radius
C) round-corner
D) radius
Answer: B) border-radius
43. The HTML <input> element with type="password" is used to:
A) Submit data
B) Hide input characters
C) Show input characters
D) Create a submit button
Answer: B) Hide input characters
44. Which HTML tag is used for adding JavaScript externally?
A) <js src="">
B) <link src="">
C) <script src="">
D) <javascript src="">
Answer: C) <script src="">
45. Which HTTP status code indicates that the request was successful?
A) 200
B) 404
C) 500
D) 301
Answer: A) 200
46. The CSS float property is primarily used for:
A) Styling text color
B) Positioning elements
C) Adding spacing
D) Changing font size
Answer: B) Positioning elements
47. The onClick attribute in HTML is used to:
A) Submit a form
B) Trigger JavaScript functions
C) Create an image
D) Link to another page
Answer: B) Trigger JavaScript functions
48. Which tag is used to create a dropdown menu in HTML forms?
A) <dropdown>
B) <menu>
C) <select>
D) <option>
Answer: C) <select>
49. Which of these is an HTML semantic element?
A) <div>
B) <span>
C) <article>
D) <br>
Answer: C) <article>
50. Which tag is used to define an HTML document’s main heading?
A) <head>
B) <header>
C) <title>
D) <h1>
Answer: D) <h1>
51. The <iframe> element in HTML is used to:
A) Embed external content
B) Create a form
C) Link stylesheets
D) Display inline images
Answer: A) Embed external content
52. Which HTML attribute specifies a unique identifier for an element?
A) id
B) class
C) name
D) type
Answer: A) id
53. Which JavaScript method is used to write a message to the console?
A) console.write()
B) console.log()
C) console.message()
D) log.console()
Answer: B) console.log()
54. In CSS, the display: none; property is used to:
A) Hide an element
B) Remove an element from the document
C) Make an element invisible but keep space
D) Remove element’s border
Answer: A) Hide an element
55. Which JavaScript method is used to select an element by ID?
A) getElementByClass()
B) getElementByTag()
C) getElementById()
D) getElementByName()
Answer: C) getElementById()
56. In HTML, the <meta charset="UTF-8"> tag specifies:
A) Language of the page
B) Character encoding
C) Document title
D) Stylesheet link
Answer: B) Character encoding
57. The CSS property used to change the alignment of flex items is:
A) align-items
B) flex-align
C) flex-direction
D) text-align
Answer: A) align-items
58. Which JavaScript function shows an alert box with a message?
A) alert()
B) display()
C) show()
D) confirm()
Answer: A) alert()
59. What is the purpose of the <footer> tag in HTML?
A) Define a header
B) Define a footer section
C) Define the main content
D) Define a section title
Answer: B) Define a footer section
60. Which CSS property sets the space around elements?
A) padding
B) margin
C) border
D) spacing
Answer: B) margin
61. The defer attribute in a <script> tag is used to:
A) Run the script after HTML is parsed
B) Load the script in an external file
C) Run the script immediately
D) Load the script in the <head>
Answer: A) Run the script after HTML is parsed
62. The main benefit of using a CDN (Content Delivery Network) is:
A) Better styling options
B) Increased page loading speed
C) Additional fonts
D) Enhanced debugging
Answer: B) Increased page loading speed
63. The purpose of the <canvas> element in HTML is:
A) Embed videos
B) Draw graphics
C) Add images
D) Display maps
Answer: B) Draw graphics
64. In JavaScript, the prompt() function is used for:
A) Displaying a message
B) Asking for user input
C) Logging errors
D) Writing to a file
Answer: B) Asking for user input
65. Which HTTP status code indicates a "Not Found" error?
A) 500
B) 404
C) 200
D) 302
Answer: B) 404
66. The <meta> tag is used for:
A) Adding main content
B) Creating forms
C) Storing metadata
D) Styling text
Answer: C) Storing metadata
67. In CSS, the z-index property is used for:
A) Font size
B) Layer positioning
C) Text alignment
D) Border thickness
Answer: B) Layer positioning
68. What does the JavaScript addEventListener function do?
A) Adds an element to the DOM
B) Adds an event handler
C) Starts an animation
D) Updates text content
Answer: B) Adds an event handler
69. In HTML, the <nav> element is used to:
A) Define navigation links
B) Display images
C) Add a footer
D) Style forms
Answer: A) Define navigation links
70. Which of the following is an example of inline CSS?
A) <p style="color: blue;">
B) <link rel="stylesheet" href="style.css">
C) <style> p {color: blue;} </style>
D) <css src="style.css">
Answer: A) <p style="color: blue;">
71. The first page of a website is typically called the:
A) Main page
B) Start page
C) Index page
D) Home page
Answer: D) Home page
72. An IP address is used to:
A) Identify a web server
B) Locate a device on a network
C) Secure web pages
D) Access email
Answer: B) Locate a device on a network
73. The “.com” in a web address is an example of a:
A) IP address
B) Protocol
C) Domain
D) File path
Answer: C) Domain
74. What does DNS stand for?
A) Data Network Service
B) Domain Name System
C) Digital Network Service
D) Domain Name Server
Answer: B) Domain Name System
75. What is the primary purpose of a web browser?
A) To manage email
B) To display web pages
C) To provide network security
D) To encode files
Answer: B) To display web pages
76. HTTP stands for:
A) HyperText Transmission Protocol
B) HyperText Transfer Protocol
C) High Transfer Protocol
D) HyperTransfer Text Protocol
Answer: B) HyperText Transfer Protocol
77. What does HTML stand for?
A) Hyper Transfer Markup Language
B) HyperText Markup Language
C) HyperTool Markup Language
D) HyperTag Markup Language
Answer: B) HyperText Markup Language
The World Wide Web (WWW) was invented by:
A) Steve Jobs
B) Tim Berners-Lee
C) Bill Gates
D) Larry Page
Answer: B) Tim Berners-Lee

You might also like