HTML Basics Flashcards

1
Q

What is an attribute?

A

Attributes provide additional information about the contents of an element. They appear on the opening tag of an element and are made up of two parts: a name and a value, suggested by an equals sign.

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

Can attributes be used on any element?

A

The majority of attributes can be used on certain elements only, but a few attributes liked the LANG attribute can appear on any element.

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

What will appear in the browser window from the body element?

A

Everything inside the body element is shown inside the main browser window.

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

What is the head element?

A

The head element usually contains information ABOUT the page, but doesn’t appear in the main browser window. The head element usually contains the title element.

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

How are tags and elements different?

A

Tags and elements are the same thing! Two names for the same thing… a tag or element will come in pairs, an opening tag and a closing tag.

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

What is structural markup?

A

Structural markup: The elements that you can use to describe both headings, subheadings, and paragraphs.

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

What is semantic markup?

A

Semantic markup: Provides extra information such as where emphasis is placed within a sentence.

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

How many headings are there in HTML5?

A

There are 6 headings: h1, h2, h3, h4, h5, h6

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

Do paragraphs show on their own line?

A

Yes, by default, a browser will show each paragraph on a new line with some space between it and any subsequent paragraphs. Same with headings - they each get their own line.

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

How do you make text appear bold?

A

You make text appear bold by using the < b > opening tag and < /b > closing tag.

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

What tags would you use for superscript?

A

The < sup > and < /sup > tags.

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

What characters would you use for subscript ?

A

The < sub > and < /sub > tags.

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

What is white space collapsing?

A

When browsers see two or more white spaces side by side in the code, it only displays one space.

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

How do you add a line break inside the middle of a paragraph?

A

You make a line break using the < br > tag.

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

What is one way to create a break between themes?

A

You can create a horizontal line using the < hr > tag.

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

What are empty elements?

A

Elements that do not have words between the opening and closing tag.

17
Q

How do you write an empty element?

A

An empty element only has one tag. Before the closing angled bracket of an empty element there will often be a space and a forward slash character.

18
Q

What are the two elements commonly used for marking up quotations?

A

The < blockquote > element and the < q > element. Both elements may use the CITE ATTRIBUTE with a web address to indicate where it is from. Blockquote is for longer quotes, and shorter, inline quotes use the < q > element. Browsers tend to indent blockquotes, but do not use the blockquote element simply to indent text on your site… CSS should be used for that instead of < blockquote>

19
Q

How do you indicate an abbreviation?

A

You use the < abbr > tag. Inside the < abbr > tag, you can use a TITLE attribute to specify the full term.

20
Q

If explaining a concept or new terminology for the first time, what element should you use?

A

You should use the < dfn > element. Put the opening and closing tags around the first instance of the new term where it is being defined.

21
Q

What is relative positioning?

A

Relative positioning changes the position of the HTML element relative to where it normally appears. So “left:20” adds 20 pixels to the element’s LEFT position.

22
Q

What is absolute positioning?

A

An element with “position: absolute” is positioned at the specified coordinates relative to a parent. If there is no parent, it will be relative to your screen top-left corner.

23
Q

What is fixed positioning?

A

Fixed positioning allows you to fix the position of an element to a particular spot on the page, regardless of scrolling (so, it is FIXED TO THE VIEWPORT). Specified coordinates will be relative to the browser window.

24
Q

What is static positioning?

A

Default value. Elements render in order, as they appear in the document flow

25
Q

What is a z-index?

A

Set to use with “position: relative” to indicate the stack order. Higher stack order goes in front of an element with a lower stack order. This property accepts values like auto, number, initial, and inherit.