HTML Flashcards

1
Q

¿What does HTML stand for?

A

Hyper Text Markup Language

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

What does HTML do?

A

Describes the structure of a Web page

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

What is HTML composed of?

A

Consists of a series of elements

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

What is an HTML Element?

A

An HTML element is defined by a start tag, some content, and an end tag.

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

What is the difference between .htm and .html extensions?

A

Is one letter only, or we can say the spelling of the words (the letter ‘L’). Earlier operating systems were not so powerful and capable of taking a four-letter word as an extension, so HTM found its existence.

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

What is “!DOCTYPE” tag used for? and how many times can be used?

A

Represents the document type, and helps browsers to display web pages correctly.

It must only appear once, at the top of the page (before any HTML tags).

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

Which tags determine the beginning of the HTML document and which the visible part of the HTML document?

A

< html > < /html > and < body > < /body >

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

What are the “h” tags for and what number do they go up to?

A

They are HTML headings and go from “h1” to “h6”

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

What are the “p” tags for?

A

They are HTML paragraphs.

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

What are “a” tags for? What attributes do they have? and what are they for?

A
  • They are HTML links
  • They have “href” attribute
  • This is where the destination link is specified.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are “img” tags for? What attributes do they have? and what are they for?

A
  • They are HTML images
  • They have “src” , “alt” , “width” , “height” attributes
  • “src” = source file, “alt” = alternative text , “width” and “height”.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are attributes used for?

A

Attributes are used to provide additional information about HTML elements.

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

What are “br” tags for?

A

Defines a line break

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

What are “hr” tags for?

A

Defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.

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

What are “pre” tags for?

A

Defines preformatted text.
The text inside a “pre” element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks

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

What are “b” tags for?

A

Defines bold text, without any extra importance.

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

What are “strong” tags for?

A

Defines text with strong importance. The content inside is typically displayed in bold.

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

What are “i” tags for?

A

Defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
Is often used to indicate a technical term, a phrase from another language, a thought, a ship name, etc.

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

What are “em” tags for?

A

Defines emphasized text. The content inside is typically displayed in italic.
A screen reader will pronounce the words in “em” with an emphasis, using verbal stress.

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

What are “small” tags for?

A

Defines smaller text

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

What are “mark” tags for?

A

Defines text that should be marked or highlighted

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

What are “del” tags for?

A

Defines text that has been deleted from a document. Browsers will usually strike a line through deleted text

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

What are “ins” tags for?

A

Defines a text that has been inserted into a document. Browsers will usually underline inserted text

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

What are “sub” tags for?

A

Defines subscript text. Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas

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

What are “sup” tags for?

A

Defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes

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

What are “blockquote” tags for?

A

Defines a section that is quoted from another source. Browsers usually indent “blockquote” elements

27
Q

What are “q” tags for?

A

Defines a short quotation. Browsers normally insert quotation marks around the quotation

28
Q

What are “abbr” tags for?

A

Defines an abbreviation or an acronym, like “HTML”, “CSS”, “Mr.”, “Dr.”, “ASAP”, “ATM”
Marking abbreviations can give useful information to browsers, translation systems and search-engines.

29
Q

What are “address” tags for?

A

Defines the contact information for the author/owner of a document or an article.
The contact information can be an email address, URL, physical address, etc.
The content usually renders in italic, and browsers will always add a line break before and after the element.

30
Q

What are “cite” tags for?

A

Defines the title of a creative work.

The text in the <cite> element usually renders in italic.</cite>

31
Q

What are “bdo” tags for?

A

Is used to override the current text direction

32
Q

How can you add comments to your HTML source?

A

By using < !– – > but without spaces

33
Q

What is the “alt” attribute for?

A

Specifies an alternate text for an image, if the image for some reason cannot be displayed.

34
Q

What is the “style” attribute for?

A

Is used to add styles to an element, such as color, font, size, and more.

35
Q

What is the “title” attribute for?

A

Defines some extra information about an element.

The value of the title attribute will be displayed as a tooltip when you mouse over the element.

36
Q

What is the “target” attribute for? and what options do it have?

A

Specifies where to open the linked document.
_self - Default. Opens the document in the same window/tab as it was clicked
_blank - Opens the document in a new window or tab
_parent - Opens the document in the parent frame
_top - Opens the document in the full body of the window

37
Q

Can you skip the end tags?

A

NO
Some HTML elements will display correctly, even if you forget the end tag
However, never rely on this! Unexpected results and errors may occur if you forget the end tag!

38
Q

Is HTML case sensitive?

A

HTML tags are not case sensitive,

but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML

39
Q

What is an empty tag?

A
  • It has no end tag
40
Q

Can you declare a comment in the middle of a line of code?

A

Yes

41
Q

How can you add a favicon?

A

Using the “link” element with “rel”=”icon”, “type”=”image/x-icon” and “href” of the icon

42
Q

What is a favicon?

A

It is a small icon that is variously displayed, as in a browser’s address bar or next to the site name in a bookmark list.

43
Q

Who invented HTML?

A

Tim Berners-Lee the also creator of world wide web (www)

44
Q

What are the 2 ways to specify the URL in the “src” or “href” attributes? and what are their differences?

A
  • Absolute URL = Links to an external image that is hosted on another website.
  • Relative URL = Links to an image that is hosted within the website. Here, the URL does not include the domain name. If the URL begins without a slash, it will be relative to the current page.
45
Q

Where should you use “lang” attribute? and why?

A

You should always include the lang attribute inside the “html” tag, to declare the language of the Web page.

46
Q

Do we have to always use lowercase attributes?

A

The HTML standard does not require lowercase attribute names.
However, W3C recommends lowercase attributes in HTML, and demands lowercase attributes for stricter document types like XHTML.

47
Q

Do we have to always quote attribute values?

A

The HTML standard does not require lowercase attribute names.
However, W3C recommends lowercase attributes in HTML.

48
Q

Can you edit the content of a “p” element with spaces to change its display?

A

No, The browser will automatically remove any extra spaces and lines when the page is displayed

49
Q

How can you change the background color of an HTML element?

A

Setting the CSS “background-color” property in the “style” attribute of the HTML element like:
style=”background-color:powderblue;”

50
Q

How can you change the text color of an HTML element?

A

Setting the CSS “color” property in the “style” attribute of the HTML element like:
style=”color:blue;”

51
Q

How can you change the size, style and color of the borders of an HTML element in a single CSS property?

A

Setting the CSS “border” property in the “style” attribute of the HTML element like:
style=”border:2px solid Tomato;”

52
Q

How can you specify colors?

A

Colornames, RGB values, HEX values, HSL values, RGBA values, and HSLA values.

53
Q

How many ways can you add CSS to HTML documents?

A

Inline - by using the style attribute inside HTML elements
Internal - by using a < style > element in the < head > section
External - by using a < link > element to link to an external CSS file

54
Q

How can you change the font that is used for an HTML element?

A

Setting the CSS “font-family” property in the “style” attribute of the HTML element like:
style=”font-family:verdana;”

55
Q

How can you change the text size for an HTML element?

A

Setting the CSS “font-size” property in the “style” attribute of the HTML element like:
style=”font-size:300%;”

56
Q

How can you change the horizontal text alignment for an HTML element?

A

Setting the CSS “text-align” property in the “style” attribute of the HTML element like:
style=”text-align:center;”

57
Q

When Inline CSS is used? and how is defined?

A

An inline CSS is used to apply a unique style to a single HTML element.
An inline CSS uses the style attribute of an HTML element.

58
Q

When Internal CSS is used? and how is defined?

A

An internal CSS is used to define a style for a single HTML page.
An internal CSS is defined in the < head > section of an HTML page, within a < style > element.

59
Q

When External CSS is used? and how is defined?

A

Is used to define the style for many HTML pages.
To use an external style sheet, add a link to it in the < head > section of each HTML page like:
< link rel=”stylesheet” href=”styles.css” >

60
Q

Where do < a > links open by default?

A

The linked page will be displayed in the current browser window

61
Q

What does “mailto:” do inside the href attribute? like in:

< a href=”mailto:someone@example.com” >Email< /a >

A

Create a link that opens the user’s email program (to let them send a new email)

62
Q

Where specifically does the following link point to?

< a href=”html_demo.html#C4” >Jump< /a >

A

To the “html_demo.html” document on the element with the id “C4”

63
Q

What tags are used to define a table in HTML? and what represent each one?

A

< table >< /table > - The begining and end of the table
< td >< /td > - Table Cells (Table Data)
< tr >< /tr > - Table Rows
< th >< /th > - Table Header (Table Column Names)