HTML Flashcards

1
Q

What is HTML?

A

Hyper Text Markup Language (Not a programming language) is the standard markup language for creating web pages. HTML describes the structure of a web page.

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

What is the HTML5 doctype declaration?

A

All HTML documents must start with a <!DOCTYPE> declaration. The declaration is not an HTML tag. It is an “information” to the browser about what document type to expect.

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

List some tags. What is <head> used for? <body>?

A

<head> Contains metadata/information for the document
<body> Defines the document's body
</body></head>

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

What are the required tags for an HTML document?

A

Some of the essential tags for an HTML document are doctype, <html>, <head>, <title> and <body>.</title>

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

What is the tag for ordered list? unordered list? Change bullet styling?

A

There are 3 different types of lists to choose from in HMTL:
- Ordered Lists <ol>
+Lists where each item <li> is numbered
+ 1, 2, 3
+ A, B, C
+ I, II, III
- Unordered Lists <ul>
+ lists where each item <li> has some bullet point
- Definition Lists <dl>
+ lists made up of terms <dt> and their definitions <dd>

The list-style-type property specifies the type of list item marker.

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

What features came with HTML5?

A

Video and Audio. Video and audio are the new tags which allow to embed a video in the website.
nav.

The nav element is used for the part of a internet site that links to different pages at the website.

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

Do all tags come in a pair? List a self-closing tag.

A

No all tags do not come in a pair.

Self Closing Tags:

<br></br>

<col></col>

<embed></embed>

<img></img>
<input></input>

<link></link>

<source></source>

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

What’s the difference between an element and an attribute? List some global attributes.

A

An HTML element is any object that sits on your page. An attribute provides further detail about a particular HTML element.

title - Specifies extra information about an element
style - Specifies an inline CSS style for an element
lang - Specifies the language of the element’s content

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

What is the syntax for a comment in HTML?

A

<!-- -->

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

What tags would you use to create a table?

A navbar?

What about a form?

A

Table - <table>; <th> for table head, <tr> for table row, <td> for table cell

Navbar - <topnav>; <a> for buttons within navbar</a></topnav>

Form - <form>; <label> for text above text box, <input></input> for input type, placeholders</label>

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

What’s the difference between a class and id?

A

Class can be used to identify and make changes to multiple elements, id only identifies one element

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

How would you include CSS into an HTML document?

A

You can include CSS into and HTML document by using an external CSS document and using the link tag to point to the .css document. For example:

<link></link>

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

What is a semantic tag?

A

Semantic HTML, or “semantically-correct HTML”, is HTML where the tags used to structure content are selected and applied appropriately to the meaning of the content. for example, <b></b> (for bold), and <i></i> (for italic) should never be used, because they’re to do with formatting, not with the meaning or structure of the content. Instead, use the replacements <strong></strong> and <em></em> (meaning emphasis), which by default will turn text bold and italic (but don’t have to do so in all browsers), while adding meaning to the structure of the content. You would use a semantic tag for Search Engine Optimization, accessibility, repurposing, light code.

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

What’s the difference between a block and an inline element?

A

A block level element will start on their own line. An inline element will have the elements side by side.

Block level element:
1
2
3

Inline level element:
123

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

What are formatting tags/elements?

A

Formatting elements were designed to display special types of text:

<b> - Bold text.
<strong> - Important text.
<i> - Italic text.
<em> - Emphasized text.
<mark> - Marked text.
<small> - Smaller text.
<del> - Deleted text.
<ins> - Inserted text.</ins></del></small></mark></em></i></strong></b>

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