HTML Flashcards

1
Q

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

A

In the head element.

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

Define Meta-data.

A

Meta-data is data that provides information about another set data. This is inside the head element and usually provides a description of the page. It is not displayed on the page.

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

Where do you put visible content about the HTML document?

A

In the < body > element.

Everything in the element has the potential to be visible.

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

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

A

< head > goes after the opening tag of the < html > element.
< body > goes after the closing tag of the < head > < /head > element.

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

What is the purpose of the < h t m l > declaration?

A
  • Each web page should begin with a HTML declaration in order to tell the browser which version of HTML the page is using, because there are several versions of them.
  • Also helps the browser render a page correctly.
  • AKA it tells us what kind of document it is.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give 5 examples of element types.

A

html, head, title, body, and h1.

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

What is the purpose of HTML attributes?

A
  • They are in the opening tag of the element to provide more information about the content.
  • example: <a> </a>
  • Made of 2 parts: a name and a value.

-another example: lang in <p> helps specify what language is being used. </p>

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

Give an example of HTML entity (also known as “escape characters”).

A

& copy would be ©
& reg would be ®

(no spaces for the special escape characters)

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

Fill in the blank:

The terms “tag” and “element” are _____________.

A

The terms “tag” and “element” are interchangeable.

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

What kind of element is the < img > element?

A

< img > is called an “empty element” or also called a “self-closing tag,” because it does not require a closing tag.

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

What does src define?

A

src tells the browser where to find the image file. This will usually be a relative URL pointing to an image.

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

What does alt define?

A

alt gives a text description of the image in case it does not load properly due to a slow connection or for viewers who use screen readers.

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

What is the purpose of the title attribute?

A

The title attribute within the < img > element gives additional information about the image. It should give an accurate description of the image content so it can be understood by screen reader software or the visually impaired.

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

What should you put as the alt attribute within the <img></img> element if the image is purely for aesthetics and has no meaning? For instance, the dividing line.

A

The attribute should still be used but the quotes should be left empty.

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

What is the difference between the < p > and < span > elements?

A

Both elements displays text content, but the < p > element is a block element and the < span > element is an inline element.

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

How do block-level elements affect the document flow?

A

Block-level elements will create a new line.

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

How do inline elements affect the document flow?

A

Inline elements will share space and only take up what is necessary. It will not start a new line.

18
Q

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

A

Width: 100%
Height: auto (whatever height the content carries)

19
Q

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

A

Width: auto
Height: auto

20
Q

What is the significance of element?

A

Updates what is no longer relevant to physically display what has changed. It shows up as a strikethrough in text.

21
Q

<strong> </strong>

A

Indicates a text that has a strong importance. Will display the text as bold.

22
Q

<em> </em>

A

Indicates emphasis that subtly changes the meaning of a sentence. Will display text in italics.

23
Q

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

A

Ordered list < ol > numbers each item in a numerical order.
Unordered list < ul > are lists that begin with bullet points.

These elements should have a < li > element in each of them. For instance:
< ol>
< li> < /li>
< li> < /li>
< /ol>
24
Q

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

A

An HTML list is a block element.

25
Q

Describe indentation relationship between the header element (< h2 >) and list element (< ol> or < / ol>< ul>).< / u l>< / h2>

A

The header and list elements are considered siblings so < ol > or < / ol >< ul > does not need to be indented after the header element. For instance:

< h2 >Ordered List Example:< / h2 >< / ul >< ol >
< li >Learn to Code.< / li >
< li >Build Projects.< / li >
< li >Get a Job.< / li >< / ol >

26
Q

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

A

. . / [ file name ]

27
Q

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

A

state the name of the directory / file name

28
Q

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

A

Repeat the . . / to indicate that you want to go up two folders (rather than one), then follow it with the file name.
so :
. . / . . /

(do ../ for each time you want to go up)

29
Q

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

A

State the name of the file source.

30
Q

What is the purpose of an HTML form element? < form>

A

The < form> element encapsulates boundaries for the form while also carrying Form controls to collect user information/data

31
Q

Give five examples of form control elements.

A
< input>
< textarea>
< select>
< button>
< label>
32
Q

Give three examples of type attribute values for HTML elements. (For < input> element)

A

“radio”
“checkbox”
“text”

33
Q

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

A

< input> is an inline element.

34
Q

What HTML tag is used to link to another website?

A

< a> element (called Anchor Tag) with a href attribute.

< a href= “www.twitch.com/” >Twitch< /a>

35
Q

What is an absolute URL?

A

Absolute URL is when you link to a different website and the href attribute is the full web address for the site.
< a href= “www.google.com” >Google< /a>

36
Q

What is a relative URL?

A

Relative URL is when you are linking to other pages within the same site and you do NOT need to specify the domain name in the URL. You can use a shorthand.

So you can link to other pages within the same site.
<a>Home< /a></a>

37
Q

Describe the Form control.

A

Form controls live inside a < form> element. This element should always carry that action attribute and will usually have a method and id attribute too.

Every < form> element requires an action attribute. Its value is the URL for the page on the server that will receive the information in the form when it is submitted.

38
Q

What are the six primary HTML elements for creating tables?

A
  1. < table>
  2. < thead>
  3. < tr>
  4. < th>
  5. < tbody>
  6. < td>
39
Q

What purpose do the thead and tbody elements serve?

A

< thead> is used as a heading or label for the data.

< tbody> represents the table data.

40
Q

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

A
  1. product and prices

2. movie title and corresponding time

41
Q

List 5 examples of inline elements.

A
  1. < b>
  2. < i>
  3. < img>
  4. < em>
  5. < span>