HTML Flashcards

1
Q

How do you link a file in the same folder as the current HTML document?

A

Use an href attribute that refers to the html document.

Element tag
href attribute
./file (the ./ represents its in the same directory)

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

How do you link to a file in a folder one level up from the folder containing the current HTML document?

A

Use an attribute tag and use the href attribute that refers to ../ and your file name.

(<a>Your Text Here</a>)

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

What is an absolute file path?

A

The full URL name

Ex. “http://www.google.com

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

What is a relative file path?

A

A derivative of the absolute file path’s URL

Example: google.com/search?q=relative+links&rlz=1C5CHFA_enUS977US977&oq=relative+links&aqs=chrome..69i57j69i60.1831j0j15&sourceid=chrome&ie=UTF-8

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

What is a hyperlink?

A

An interactive text on the web that navigates the user from one link to another.

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

Do all HTML elements require a closing tag?

A

Most but not all. However it is in good practice to have or check for closing tags.

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

What are attributes for in HTML?

A

Attributes provide additional information about HTML elements.

  • All HTML elements can have attributes.
  • Attributes are always stated in the start of the tag.
  • Attributes usually come in the name/value pair. (Ex. name=”value”)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the alt attribute on the <img></img> element?

A

Alt attribute provides additional information for the <img></img> element in the case the image did not display.

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

How many heading elements are available for HTML?

A

6

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

What tags are necessary to complete an HTML skeleton?

A
  • doctype declaration of html = this declares the document as html
  • html tag = this is always at the beginning and end of the document
  • head tag = provides info about the html
  • title tag = gives a name for the html document that can be seen on the browser tab
  • body tag = this provides visible and tangible information for the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What type of content belongs within the head tag of an HTML document?

A
  • Information about the HTML document

- Title tag that is used describe the document and for the user to see on the browser title or page tab

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

What type of information belongs within the body tag of the HTML document?

A

Visible and tangible content for the user. This includes: links, images, and text.

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

Where must the DOCTYPE declaration appear in a valid HTML document?

A

In the beginning of the document.

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

What is the difference between the href and src attribute?

A

href establishes a relationship between current application and external source
(relies on external resource)

src adds the resource to the page
(acquired internally)

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

Where do you put non-visible content about the HTML document?

A

Inside the head element

Info is called meta-data

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

Where do you put visible content about the HTML document?

A

Inside the body element

17
Q

Where do the head and body tags go in a valid HTML document?

A

Head and body tags are children to the html element.

These two elements are siblings

18
Q

What is the purpose of a !DOCTYPE declaration?

A

Declares that the document is HTML

19
Q

Give five examples of HTML element types

A

Head, body, title, h1, p

20
Q

What is the purpose of HTML attributes?

A

To describe/add/customize to a specific html element

21
Q

Give an example of an HTML entity (escape character).

A

ambersan(&)word(xyz)semicolon(;)

  • Do it to save time
  • Isn’t mistaken for code
22
Q

How do block-level elements affect the document flow?

A

These start a new line.
Only appear within the body element.
Take respective space of their parent element’s container.

23
Q

How do inline elements affect the document flow?

A

These do not start on a new line.
Contain only data and other inline elements.
Cannot have block elements inside them.

24
Q

What are the default width and height of a block-level element?

A

Takes the full width that is available (100%)

Takes as much height as content requires (auto)

25
Q

What are the default width and height of an inline element?

A

Takes only as much width and height that has been stated. (auto)

26
Q

Difference between b tag versus strong tag, i tag versus emphasis tag, or del and s tag versus strike tag.

A

Strong, emphasis, and del/s tag are used for screen readers and to explain specific data on the html

b and i tag are used for styling and should be changed via CSS instead

Strike tag is a deprecated tag and should no longer be used

27
Q

What is the difference between an ordered list and an unordered list in HTML?

A

Ordered lists (ol) are ordered (default is numbered)

Unordered lists (ul) are unorganized (default is bulleted)

28
Q

Is an HTML list a block element or an inline element?

A

An HTML list is a block element because it starts on a new line and the list takes the whole width of its parent’s container

29
Q

How do you indicate the relative link to a parent directory?

A

(a href=”../fileName.html”)File Name(/a>)

30
Q

How do you indicate the relative link to a child directory?

A

(a href=”childName/fileName.html”)Child Name(/a)

31
Q

How do you indicate the relative link to a grand parent directory?

A

(a href=”../../grandParentFileName.html)Grand Parent File Name(/a)

32
Q

How do you indicate the relative link to the same directory?

A

(a href=”fileName.html”)File Name(/a)

33
Q

What is the purpose of an HTML form element?

A

Allows for the collection of data/information from the user

34
Q

Give five examples of form control elements.

A

Adding Text

<ul><li>Text Input</li><li>Password Input</li><li>Text Area</li></ul>

Making Choices

<ul><li>Radio Buttons</li><li>Checkboxes</li><li>Drop-down boxes (select)</li></ul>

Submitting Forms

<ul><li>Submit Buttons</li><li>Image Buttons</li></ul>

Uploading Files

<ul><li>File Upload</li></ul>

Buttons

35
Q

Give three examples of type attribute values for HTML < input > elements.

A
type="text"
type="password"
type="radio"
type="checkbox"
type="select"
type="file"
type="submit"
type="image"
36
Q

Is an HTML < input > element a block element or an inline element?

A

It is an inline element

37
Q

What are the six primary HTML elements for creating tables?

A

Table, thead, tbody, th, tr, td

38
Q

What purpose do the thead and tbody serve?

A

Thead - Contains the headings of the table

Tbody - Contains the body of the table

39
Q

Give two examples of data that would lend itself well to being displayed in a table.

A

Tabular Data

  • Stock tickers
  • Sports results
  • etc.