Basic HTML | What is HTML? Flashcards

1
Q

What does HTML stand for?

A

Hypertext Markup Language

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

What is the primary purpose of HTML?

A

Creating web pages

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

What do you see when you visit a website that is created using HTML?

A

Content like paragraphs, headings, links, images, and videos

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

What is an HTML element?

A

A component that represents the content and structure of a webpage

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

What are the two types of tags used in HTML elements?

A

Opening tag and closing tag

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

What distinguishes a closing tag from an opening tag?

A

The forward slash (/) in a closing tag

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

What are void elements in HTML?

A

Elements that do not have a closing tag and cannot have content

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

Give an example of a void element.

A

<img></img>

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

What is an attribute in HTML?

A

A special value used to adjust the behavior of an HTML element

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

What does the src attribute specify in an image element?

A

The location of the image

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

What is the purpose of the alt attribute in an image element?

A

To provide short, descriptive text for the images

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

Fill in the blank: HTML is for ________, CSS is for ________, and JavaScript is for ________.

A

content and structure, styling, adding interactivity

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

What analogy is used to compare HTML, CSS, and JavaScript?

A

HTML is the building blocks, CSS is the design, JavaScript is the systems

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

Is HTML sufficient to build a modern professional website?

A

No, you will also need CSS and JavaScript

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

What is the role of CSS in web development?

A

Styling the web pages

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

What does JavaScript add to web pages?

A

Interactivity

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

What is an attribute in HTML?

A

A value placed inside the opening tag of an HTML element that provides additional information about the element or specifies how the element should behave.

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

What is the basic syntax for an attribute?

A

<element></element>

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

What does the href attribute specify?

A

The URL of a link.

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

What happens if the href attribute is not included in a link?

A

The link would not work because there would be no destination URL.

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

What is the purpose of the src attribute in an img element?

A

To specify the source of an image.

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

What does the alt attribute provide?

A

Alternative descriptive text for the image.

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

Is the alt attribute required?

A

No, but it is recommended for accessibility purposes.

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

What does accessibility mean in the context of web content?

A

Making sure that everyone, including those with disabilities, can use and understand websites, apps, and physical spaces.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is unique about the syntax of the checked attribute?
It does not require a value; if present, the checkbox will be checked by default.
26
What does the type attribute in an input element specify?
The type of input, such as checkbox.
27
What are boolean attributes in HTML?
Attributes that specify the state of an element, such as whether it is disabled, read-only, or required.
28
List some common boolean attributes in HTML.
* disabled * readonly * required
29
What is the importance of understanding HTML attributes?
Essential for creating interactive and accessible web content.
30
Fill in the blank: The _______ attribute is used to specify that a checkbox should be checked by default.
checked
31
True or False: The alt attribute is required for all images in HTML.
False
32
What is the purpose of the link element in HTML?
To link to external resources like stylesheets and site icons ## Footnote The link element helps separate content from design by linking to CSS files.
33
What is the basic syntax for using the link element for an external CSS file?
## Footnote This syntax specifies the relationship and location of the stylesheet.
34
What does the rel attribute specify in the link element?
The relationship between the linked resource and the HTML document ## Footnote In this case, it specifies that the linked resource is a stylesheet.
35
Why is it considered best practice to separate HTML and CSS?
To maintain cleaner code and organization ## Footnote Developers use the link element for external CSS instead of embedding styles directly in HTML.
36
What does the href attribute specify in the link element?
The location of the URL for the external resource ## Footnote It directs the browser to the specific file or resource.
37
What does the dot followed by a forward slash in the href attribute indicate?
It tells the computer to look in the current folder for the resource ## Footnote In the example, it points to the styles.css file.
38
Where should the link element be placed in an HTML document?
Inside the head element ## Footnote This is important for proper loading of styles before rendering the page.
39
What are common resources linked using multiple link elements in a professional codebase?
Stylesheets, fonts, and icons ## Footnote Having multiple link elements allows for modular design and resource management.
40
What does the preconnect value for the rel attribute do?
It tells the browser to create an early connection to the specified URL ## Footnote This improves loading times for external resources.
41
What is a favicon?
A small icon typically displayed in the browser tab next to the site title ## Footnote Favicons help in branding and site recognition.
42
How is a favicon linked in HTML?
## Footnote This specifies the location of the favicon file.
43
What is the HTML boilerplate?
A ready-made template for webpages that includes the basic structure and essential elements every HTML document needs ## Footnote It saves time and helps ensure proper page setup.
44
What does the DOCTYPE declaration do?
It tells browsers which version of HTML you're using ## Footnote Example:
45
What does the tag do?
It wraps around all your content and can specify the language of your page ## Footnote Example:
46
What are the two main sections inside the tag?
Head and body ## Footnote Example structure: ......
47
What information is contained in the section?
Important metadata about the document, such as character encoding and title ## Footnote Example: Document Title
48
What does the element determine? </div> </div> <div class='card-face answer'> <div class='answer-content'> The text that appears in the browser tab or window ## Footnote Example: <title>freeCodeCamp
49
Where should you link your external stylesheets?
In the section using elements ## Footnote Example:
50
What goes inside the section?
All the visible content of your webpage, such as headings and paragraphs ## Footnote Example:

I am a main title

Example paragraph text

51
Why is a boilerplate important?
It ensures pages are structured correctly and work well across different browsers ## Footnote It helps avoid common mistakes and follow best practices.
52
Can you customize your own boilerplate?
Yes, you can add your own preferred elements or meta tags as you gain experience ## Footnote Personalizing your boilerplate can save time for new projects.
53
Fill in the blank: A boilerplate acts like the _______ of a house.
foundations
54
True or False: The section is where metadata is stored.
False ## Footnote Metadata is stored in the section.
55
What is the purpose of the elements in the section?
To provide details about character encoding and how links should be previewed ## Footnote Example:
56
What does UTF-8 stand for?
UCS Transformation Format 8
57
What is character encoding?
The method computers use to store characters as data
58
What is a byte in computing?
A unit of data consisting of 8 bits
59
What does UTF-8 support?
Every character in the Unicode character set
60
Why is UTF-8 needed in web development?
To ensure correct display of characters from all writing systems and languages
61
What is the purpose of the meta element with charset attribute?
To set the character encoding for a web page
62
Fill in the blank: The character encoding can be set to _______ to ensure proper display of characters.
UTF-8
63
True or False: UTF-8 can only encode Latin characters.
False
64
What is an example of a character that UTF-8 can display correctly?
Accented 'e' character (é)
65
What HTML tag is used to specify the character encoding?
66
In what context should you include the meta element with charset attribute set to UTF-8?
For each new project you create
67
What is the significance of the line in HTML?
It ensures the correct interpretation of characters on the web page
68
What would happen if the character encoding is not set to UTF-8?
Characters may not display correctly