HTML Flashcards

1
Q

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

A

o Before the BODY element you will often see a HEAD element.
The HEAD contains information ABOUT the page
You will usually find a TITLE element inside the HEAD element.

o HEAD for metadata (self referential – data that describes data).

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

• Where do you put visible content about the HTML document?

A

o In the body element

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

• Where do the HEAD and BODY tags go in a valid HTML document?

A

o Following the html tag

o Ancestor and descendant / parent and child.

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

• What is the purpose of a !DOCTYPE declaration?

A

o Because there have been several versions of HTML, each web page should begin with a DOCTYPE declaration to tell a browser which version of HTML the page is using (although browsers usually display the page even if it is not included).

o The use of a DOCTYPE can also help the browser to render a page correctly.

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

• Give five examples of HTML element types.

A

o html tag – This tag acts as a container for every other element in the document except the !DOCTYPE tag.
o HEAD tag– Includes all the document’s metadata.
o TITLE tag – Defines the title of the document which is displayed in the browser’s title bar.
o BODY tag – Acts as a container for the document’s content that gets displayed on the browser.
o … Nearly 200 types of element types

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

• What is the purpose of HTML attributes?

A

o They provide more information about the elements

o HTML attributes can be used to change the color, size, and other features of HTML elements.

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

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

A

o These are used to escape characters that are markup sensitive in certain contexts
o ( & < > “ ‘ etc. )

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

• How do block-level elements affect the document flow?

A

o Some elements will always appear to start on a new line in the browser window. These are known as block level elements.

o The <div> element allows you to group a set of elements together in one block-level box.

o For example, you might create a <div> element for the header of your site (the logo and the navigation, or you might create a <div> element to contain comments from visitors.</div></div></div>

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

• How do inline elements affect the document flow?

A

o Some elements will ALWAYS appear to continue on the same line as their neighboring elements.

o These are known as inline elements.

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

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

A

o By default, the height of a block element is the height of the content, and the width is the length of the page

o Width 100% and default height of “auto”

o By default, block-level elements begin on new lines, but inline elements can start anywhere in a line.

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

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

A

o Width and height for inline is always “auto” (adjusts to size of the content)

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

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

A

o Ordered lists are lists where each item in the list is numbered.
o An ordered list is created with the <ol> element and has numbers.
o (It is better to use the CSS list-style-type property covered on pages 333-335.

o Unordered lists are lists that begin with a bullet point (rather than characters that indicate order.)</ol>

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

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

A

o An HTML list is a block element.

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

• What HTML tag is used to link to another website?

A

o Links are created using the <a> element.</a>

o Users can click on anything between the opening A tag and the closing </a> tag.

o <a></a>

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

• What is an absolute URL?

A

o Absolute URLs are the FULL or absolute web address

o Includes the protocol and the domain.

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

• What is a relative URL?

A

o Does NOT include protocol or domain name.

o Relative URLS can be used when linking to pages within your own website.

17
Q

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

A

o Use ../ to indicate the folder ABOVE the CURRENT one, the follow it with the file name.

o <a>Home</a>

18
Q

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

A

o For a child folder, use the name of the child folder, followed by a forward slash, then the file name.

o <a>Listings</a>

19
Q

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

A

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

o <a>Home</a>

20
Q

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

A

o To link the file in the same folder, just use the file name. (Nothing else is needed).

o <a>Reviews</a>

21
Q

• What is the purpose of an HTML form element?

A

o Sets up the boundaries what area we will have elements/user is meant to interact with.

o The FORM element uses the ACTION attribute to indicate the page that the data is being sent to.

o The FIELDSET element is used to GROUP related questions together.

o The LABEL element indicates the PURPOSE of each form control.

22
Q

• Give five examples of form control elements.

A

o The common input types

button, checkbox, file, hidden, image, password, radio, reset, submit, and text.

23
Q

• Give three examples of type attribute values for HTML INPUT elements.

A

o Checked – radio, checkbox – Whether the command or control is checked

o Form – all – associates the control with a form element

o Required – almost all – Boolean (MUHAHAHA). A Value is required or must be checked for the form to be submittable.

24
Q

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

A

INLINE

25
Q

• What are the six primary HTML elements for creating tables?

A
26
Q

• What purpose do the thead and tbody elements serve?

A

o The THEAD HTML element defines a set of rows defining the head of the columns of the table.

o Table body TBODY encapsulates a set of table rows, indicating that they comprise the boy of the table.

27
Q

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

A

o Financial reports
o Schedules
o Sports Results