What does the cols attribute specify in a textarea element?
The alignment of the textarea
The width of the textarea
(correct)
The height of the textarea
The maximum number of characters allowed
What is the purpose of the <optgroup> element in a dropdown list box?
To link options to a server
To group related options together
(correct)
To allow multiple selections
To provide a default selection
What is the role of the <label> tag in a form?
To create a dropdown list
To define a label for an input element
(correct)
To create a clickable button
To group related form elements
Which HTML element is used to group related form controls together and provides a caption?
<fieldset> (B)
Signup and view all the answers
What is the purpose of the value attribute in the <option> element within a dropdown list?
<p>To specify the value to be sent to the server (B)</p>
Signup and view all the answers
What is the purpose of the HTML
<p>To display video content on a webpage (B)</p>
Signup and view all the answers
Which of the following is NOT a supported video format for the HTML
<p>AVI (D)</p>
Signup and view all the answers
What attribute of the
<p>controls (B)</p>
Signup and view all the answers
What does the 'autoplay' attribute do in the
<p>It starts playing the video as soon as it is ready. (B)</p>
Signup and view all the answers
Which attribute would you use to specify the size of an <iframe> element?
<p>height and width (A)</p>
Signup and view all the answers
What is the main use of HTML forms?
<p>To collect information from users (B)</p>
Signup and view all the answers
Which audio format is NOT supported by the HTML
<p>AAC (B)</p>
Signup and view all the answers
What will display in place of a video if the browser does not support the
<p>Text defined between the <video> and </video> tags (C)</p>
Signup and view all the answers
What does the action attribute of a form do?
<p>Points to the webpage that loads after submission (A)</p>
Signup and view all the answers
Which HTTP method appends form data inside the body of the request and offers better security?
<p>POST method (A)</p>
Signup and view all the answers
When would it be appropriate to use the GET method for a form submission?
<p>When retrieving data from a web server (C)</p>
Signup and view all the answers
What does the maxlength attribute of an input element control?
<p>The maximum number of characters allowed (D)</p>
Signup and view all the answers
In a form, what type of input allows users to select one option from multiple choices?
<p><input type='radio'> (B)</p>
Signup and view all the answers
What is one limitation of the GET method regarding URL length?
<p>It has a limit of about 3000 characters. (A)</p>
Signup and view all the answers
Which input type is specifically designed to conceal the characters entered by a user?
<p><input type='password'> (D)</p>
Signup and view all the answers
Which of the following is NOT a standard attribute of a form?
<p>enctype (B)</p>
Signup and view all the answers
What is the purpose of the <input type='submit'> element in a form?
<p>It sends the form data to the server. (A)</p>
Signup and view all the answers
Which input type is used when you want a user to select a date and time combination without a time zone?
<p><code><input type='datetime-local'></code> (B)</p>
Signup and view all the answers
What function does the <input type='hidden'> serve in a form?
<p>To collect data that users should not see. (C)</p>
Signup and view all the answers
When using <input type='number'>, what attributes can you specify to restrict the values a user may enter?
<p>max and min (B)</p>
Signup and view all the answers
Which input type would you use to create a field for entering a telephone number?
<p><code><input type='tel'></code> (C)</p>
Signup and view all the answers
What does the placeholder attribute in an input field specify?
<p>A short hint describing the expected input. (D)</p>
Signup and view all the answers
Which input type allows a user to upload a file like an image or a document?
<p><code><input type='file'></code> (C)</p>
Signup and view all the answers
In which scenario would you use <input type='range'>?
<p>When the exact numeric value is not essential. (A)</p>
Signup and view all the answers
Flashcards
HTML
The <video> tag is used to display video content in a web page, allowing users to watch movies, clips, and other video streams.
HTML tag within
The <source> tag within <video> is used to specify different video sources. The browser selects the first source it supports.
HTML
The <audio> tag is used to play audio content, such as music or audio streams, directly on a web page.
HTML <iframe> tag
An inline frame (<iframe>) allows you to embed content from another webpage onto your current page. For example, you could embed a live map from Google Maps.
Signup and view all the flashcards
HTML forms
HTML forms are used to collect information from users, such as name, email, or feedback. This data is often sent to a server for processing.
Signup and view all the flashcards
controls attribute
The controls attribute adds a set of built-in controls (play, pause, volume) to the video or audio player.
Signup and view all the flashcards
autoplay attribute
The autoplay attribute starts the video or audio playback automatically as soon as the page loads.
Signup and view all the flashcards
muted attribute
The muted attribute silences the audio of the video by default.
Signup and view all the flashcards
Input File
Allows users to choose a file from their computer to upload to a website. The type attribute specifies the supported file types.
Signup and view all the flashcards
Submit Button
Used to send form data to a server. The value attribute sets the button's text.
Signup and view all the flashcards
Input Button
Displays a clickable button that can trigger actions using JavaScript. It doesn't submit the form data.
Signup and view all the flashcards
Input Color
Allows the user to select a color from a color picker.
Signup and view all the flashcards
Input Date
Allows the user to select a date.
Signup and view all the flashcards
Input Date and Time
Allows the user to select a date and time. Doesn't include the time zone.
Signup and view all the flashcards
Input Email
Used for input fields that expect an email address. Provides a simple way to check if the format is likely correct.
Signup and view all the flashcards
Input Hidden
Defines an input field invisible to the user. Useful for storing data that is not visible on the web page but sent to the server.
Signup and view all the flashcards
Form
A HTML element defining a form that collects user input, like a login form, a search bar, or a feedback form.
Signup and view all the flashcards
Form Action Attribute
The attribute in the <form> tag that specifies the webpage to be loaded after submitting a form.
Signup and view all the flashcards
Form Method Attribute
Determines the HTTP method (GET or POST) used to send form data to the server.
Signup and view all the flashcards
GET Method
Adds the form data to the end of the URL, visible in the browser's address bar. Best for short forms.
Signup and view all the flashcards
POST Method
Sends form data inside the body of the HTTP request, concealed from the URL. Ideal for sensitive and large data.
Signup and view all the flashcards
<input type="text">
Creates a one-line text box for entering input. Attributes like size and maxlength control the box's appearance.
Signup and view all the flashcards
<input type="password">
Creates a text box like text, but hides the characters entered for security. Commonly used for passwords.
Signup and view all the flashcards
<input type="radio">
Allows selecting only one option from a set. Uses the same name attribute for all related options, ensuring only one can be chosen.
Signup and view all the flashcards
What is a textarea?
A <textarea> is an HTML element used for creating multiline text input fields. It is defined by the <textarea> tag and can be customized using attributes like cols and rows to control its width and height.
Signup and view all the flashcards
What is a drop-down list box?
A <select> element represents a drop-down list, allowing users to choose a single option from a list. It's defined using the <select> tag and contains <option> elements to define each individual choice.
Signup and view all the flashcards
What is an option in a drop-down list?
The <option> tag within <select> represents a single option in the dropdown list. It can be given a value using the value attribute, which is sent to the server when the option is chosen.
Signup and view all the flashcards
What is the purpose of <label>?
The <label> tag is used to associate a label with a form control. It is commonly used to provide descriptive text for elements like text fields, checkboxes, or radio buttons.
Signup and view all the flashcards
What is the purpose of <fieldset>?
The <fieldset> element groups related form controls together visually. It is often used to make a form more organized and visually appealing. The <legend> element is used to display a caption within the fieldset.
Signup and view all the flashcards
Study Notes
HTML Multimedia Tags
Multimedia on the web includes sound, music, videos, movies, and animations.
Multimedia files have various formats and extensions (e.g., .wav, .mp3, .mp4, .mpg, .wmv, .avi).
The <video> tag plays video content on webpages, including movies and video streams.
Before HTML5, there was no standard tag for videos.
The <video> tag can contain one or more <source> tags, specifying different video sources.
The browser uses the first supported source.
Content between <video> and </video> displays only if the browser doesn't support the <video> tag.
HTML video supports MP4, WebM, and Ogg formats.
Attributes of HTML Video Tag
controls: Displays video controls (play/pause).
width: Sets width of the video player.
height: Sets height of the video player.
autoplay: Starts playing automatically.
src: Specifies the URL of the video file.
loop: Repeats the video.
muted: Silences audio.
HTML Audio Tag
The <audio> tag plays audio content (like music) on webpages.
Before HTML5, there was no standard tag.
Supported audio formats include MP3, WAV, and Ogg.
HTML Iframes
<iframe> displays a webpage within another webpage.
Common use includes embedding Google Maps.
Attributes of <iframe>
src: Specifies the URL of the page to display.
height and width: Specify the dimensions of the iframe.
HTML Forms
HTML forms collect user input, often sent to a server for processing.
The most common form is the search box on a website's homepage.
Form Attributes
action: Specifies the URL to which the form data is sent.
method: Specifies the HTTP method (GET or POST) used to send data.