Unit 3: Multimedia and Interactivity Flashcards

1
Q

create a hyperlink:
<a>Click here to visit Example.com</a>

A

the a tag is used to create a hyperlink to the website “https://www.example.com”. The href attribute specifies the URL of the website, while the text between the opening and closing a tags is the visible text that the user clicks on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

<a>Jump to Section 1</a>

<h2>Section 1</h2>

<p>Content for section 1 goes here</p>

A

the a tag is used to create a link to a section of the same page with the id attribute of “section1”. When the user clicks on the “Jump to Section 1” link, the browser will automatically scroll down to the section with the corresponding id.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The ………… attribute is used to specify where the linked document will be displayed when a user clicks on a hyperlink.

A

target

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

By default, the linked document opens in the same window or tab as the current document. However, you can use the…………….. to change this behavior.

A

target attribute
_blank

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Target attribute
<a>Click here to visit Example.com</a>

A

When you use the _blank value for the target attribute, the linked document will open in a new window or tab. Here’s an example:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In this example, the a tag creates a hyperlink to the website “https://www.example.com”. The href attribute specifies the URL of the website, while the text between the opening and closing a tags is the visible text that the user clicks on.

A

<a>Click here to visit Example.com</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Relative pathnames?
A relative pathname is a URL that is relative to the current webpage’s location. This means that you only need to specify the path from the current page to the linked page, without including the full URL of the website. For example:

A

<a>
About Us</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Absolute pathnames:
An absolute pathname is a URL that includes the full path to the linked page, starting from the root directory of the website. For example:

A

<a>About Us</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

LIST 3 Advantages of relative pathnames:

A

Can simplify your code by using shorter URLs

Can make your code more flexible, as you can move your files around without breaking links

Can make your code more portable, as you can use the same code on different servers without changing the URLs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

LIST 2 Disadvantages of relative pathnames:

A

May become complicated if you have a deep folder structure or if you’re linking to a file in a different folder

May not work if the file structure is changed and the relative path is no longer valid

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

LIST 2 Advantages of absolute pathnames:

A

Can be more specific about the location of the linked page

Can be useful when linking to pages on other website

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

LIST 2 Disadvantages of absolute pathnames:

A

Can make your code less flexible, as the link will break if the domain or file structure is changed

Can make your code less portable, as you will need to change the URLs if you move your code to a different server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The ……… link is used to create a hyperlink that will automatically open the user’s email client with a new email message, pre-populated with information such as the recipient’s email address, subject line, and body text.

A

mailto

<a>Send Email</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

to: Specifies the email address of the recipient. You can include multiple email addresses by separating them with commas.

A

Example: mailto:recipient1@example.com,recipient2@example.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

cc: Specifies the email address(es) of the recipients to be included in the carbon copy (CC) field.

A

Example: mailto:recipient@example.com? cc=copy1@example.com,copy2@example.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

bcc: Specifies the email address(es) of the recipients to be included in the blind carbon copy (BCC) field.

A

Example: mailto:recipient@example.com?bcc=blindcopy1@example.com,blindcopy2@example.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

subject: Specifies the subject line of the email.

A

Example: mailto:recipient@example.com?subject=Subject%20Line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

body: Specifies the body text of the email.

A

Example: mailto:recipient@example.com?body=Body%20Text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

attachment: Specifies the file attachment(s) to be included in the email.

A

Example: mailto:recipient@example.com?attachment=http://www.example.com/files/document.pdf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

<img></img>

A

The src attribute specifies the location of the image file, while the alt attribute provides a description of the image for screen readers or if the image fails to load.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

<img></img>

A

The src attribute specifies the location of the image file, while the alt attribute provides a description of the image for screen readers or if the image fails to load.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

i. Image Types?

A

i. Image Types:
There are three main types of image formats used on the web: GIF, JPEG, and PNG. GIF and PNG are best suited for simple images with few colors, while JPEG is best for photographs or images with many colors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Adding an Image Alternate Text:

A

The alt attribute in the <img></img> tag provides a text alternative for the image. It’s important to include alternate text for accessibility reasons and for search engine optimization.

23
Q

Adding an Image Title:
.

A

Adding an Image Title:
The title attribute in the <img></img> tag provides a tooltip when the user hovers over the image.

24
Q

Text and Image Alignment:

A

To align an image and text, you can use the align attribute. This attribute can be set to “left”, “right”, “center”, or “justify”.

25
Q

Wrapping Text Next to Images:

A

<div>
<img></img>
<p>Your text goes here...</p>
</div>

26
Q

Manipulating Images:

A

<img></img>

27
Q

Demonstrate Use of Audio Element:

A

To add audio to a webpage, use the <audio> tag</audio>

<audio></audio>

28
Q

Use SRC Element in audio :

A

Use the src attribute to specify the location of the audio file. Common audio file extensions include OGG, WAV, and MP3.

29
Q

Use Controls Attribute:

A

The controls attribute adds audio playback controls to the audio element.

30
Q

Allow Audio to Start Automatically:

A

Add the autoplay attribute to the <audio> tag to allow the audio to start playing automatically.</audio>

31
Q

Allow Audio to Loop:

A

Add the loop attribute to the <audio> tag to allow the audio to loop continuously.</audio>

32
Q

Use Preload:

A

Use the preload attribute to control the buffering of the audio file. It can be set to “auto”, “metadata”, or “none

33
Q

Demonstrate Use of Video Element:

A

<video>
<source></source>
</video>

34
Q

Use SRC Element video:

A

Use the src attribute to specify the location of the video file. Common video file extensions include OGG, MP4, and WebM.Use the src attribute to specify the location of the video file. Common video file extensions include OGG, MP4, and WebM.

35
Q

c. Use Controls Attribute:

A

The controls attribute adds video playback controls to the video element.

36
Q

Description of Forms:

A

Description of Forms:
Forms are used to collect information from users on a webpage.

37
Q

The Form Tag:

A

The <form> tag defines a form on a webpage.

38
Q

Creating Form Controls:
.

A

Use various form controls such as <input></input>, <textarea>, and <select> to create form elements</select></textarea>

39
Q

Password:

A

This input type is used to create a text box for password input. The text entered in the box is masked for security purposes.
Example: <input></input>

40
Q

Text: This input type is used to create a single-line text box.

A

The size attribute specifies the visible width of the text box, and the maxlength attribute specifies the maximum number of characters that can be entered.Example:
<input></input>

41
Q

Textarea: This input type is used to create a multi-line text box.

A

The rows and cols attributes specify the number of rows and columns of the text box, respectively.
Example: <textarea></textarea>

42
Q

Radio Buttons: This input type is used to create a set of radio buttons.

A

The name attribute groups the radio buttons together, and the value attribute specifies the value of each button.

<input></input> Male
<input></input> Female

43
Q

Checkboxes:

A

This input type is used to create a checkbox. The name attribute groups the checkboxes together, and the value attribute specifies the value of the checkbox.
Example: <input></input> Subscribe to newsletter

44
Q

Search, Email, URL, Tel, Number, Range, Date, Week, Month, Datetime, Datetime-local, Time, Color: These input types are used to create specific types of input fields for various types of data.

A

<input></input>
<input></input>
<input></input>
<input></input>
<input></input>
<input></input>
<input></input>
<input></input>
<input></input>

45
Q

Hidden:

A

This input type is used to create a hidden input field. The value of this field is not visible on the web page but can be submitted along with the form data.
Example: <input></input>

46
Q

File:

A

This input type is used to create a file upload control. The accept attribute specifies the types of files that can be uploaded.
Example: <input></input>

47
Q

Button, Submit, Reset: These input types are used to create buttons for various purposes. The button type creates a simple button, the submit type submits the form, and the reset type resets the form to its initial values.

A

<input></input>
<input></input>
<input></input>

48
Q

<label>Select a fruit:</label>
<select></select>

<optgroup>
<option>Orange</option>
<option>Lemon</option>
</optgroup>

<optgroup>
<option>Strawberry</option>
<option>Blueberry</option>
</optgroup>

</select>

A

The select element is used to create a drop-down list of options. The option element is used to define each option, and the optgroup element is used to group related options together. The label attribute is used to provide a label for the select control.

49
Q

The fieldset element is used to group related form controls together, and the legend element is used to provide a label for the fieldset.

A

<fieldset>
<legend>Personal Information</legend>
<label>Name:</label>
<input></input>
<label>Email:</label>
<input></input>
</fieldset>

50
Q

<label>Select a browser:</label>
<input></input>

<datalist>
<option>
<option>
<option>
<option>
<option>
</datalist>
</option></option></option></option></option></datalist>

A

The datalist element is used to provide a list of pre-defined options for an input control. The list attribute of the input element is used to associate the input with the datalist. The option element is used to define each option in the datalist.

51
Q

The for attribute is used to associate a label element with its corresponding form control. This allows users to click on the label to focus on the associated form control.

A

<label>Username:</label>
<input></input>

52
Q

The disabled attribute is used to disable a form control, preventing user interaction with it. The readonly attribute is used to make a form control read-only, allowing its value to be submitted with the form but not editable by the user.

A

<input></input>
<input></input>

53
Q

The placeholder attribute is used to provide a hint or example value for a form control. It is displayed in the control until the user enters a value.

A

<input></input>

54
Q

The autocomplete attribute is used to specify whether a form control should have autocomplete enabled or disabled. It can have values like “on”, “off”, “name”, “email”, “tel”, etc.

A

<input></input>
<input></input>