HTML Flashcards

(45 cards)

1
Q

Full Form of HTML

A

Hyper Text Markup Language

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

Basic HTML Structure

A

<!DOCTYPE html>

<html>
<head>
<meta></meta>
<title>title</title>
</head>
<body>

</body>
</html>

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

What does <!DOCTYPE html> stand for?

A

The <!DOCTYPE html> declaration defines that this document is an HTML5 document

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

What does <html> stand for?

A

The <html> element is the root element of an HTML page

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

What does <head> stand for?

A

The <head> element contains meta information about the HTML page

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

What does <title> stand for?</title>

A

The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab)</title>

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

What does <body> stands for?

A

The <body> element defines the document’s body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

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

How do you add headings in html?

A

By use of tags from <h1> </h1> to </h6>.
Where <h1> is the most important heading in the body and it decreases going down the line, <h6> being the less important.

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

What does <p> stands for?

A

The <p> element defines a paragraph.

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

What does <br></br> stands for?

A

The <br></br> element adds a line break in a paragraph.

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

What does <a> stands for?</a>

A

The <a> element is used for adding links into a webpage.</a>

e.g. <a>This is a link</a>
Where href is used for adding the web address.

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

How do you host images in html?

A

HTML images are defined with the <img></img> tag.

The source file (src), alternative text (alt), width, and height are provided as attributes:

E.g. <img></img>

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

What does the style attribute do?

A

The style attribute is used to add styles to an element, such as color, font, size, and more.

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

What does the lang attribute do?

A

The lang attribute is used to define language of then webpage.

It is used to assist web browser and search engines.

Country codes can also be added to the language code in the lang attribute. So, the first two characters define the language of the HTML page, and the last two characters define the country.

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

What does the title attribute do?

A

The title attribute defines some extra information about an element.

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

What does the <hr> tag do?

A

The <hr> tag 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
17
Q

What does the <pre> tag do?

A

The HTML <pre> element 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
18
Q

What are the different style attributes?

A

background-color for background color
color for text colors
font-family for text fonts
font-size for text sizes
text-align for text alignment

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

What are the different formatting attributes?

A

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

20
Q

What are the different Quotation and Citation elements?

A
  1. <abbr> - Defines an abbreviation or acronym</abbr>
  2. <address> - Defines contact information for the author/owner of a document

    </address>
  3. <bdo> - Defines the text direction</bdo>
  4. <blockquote> - Defines a section that is quoted from another source

    </blockquote>
  5. <cite> - Defines the title of a work</cite>
  6. <q> - Defines a short inline quotation</q>
21
Q

What are the different values for the target attribute for links?

A
  1. _self - Default. Opens the document in the same window/tab as it was clicked
  2. _blank - Opens the document in a new window or tab
  3. _parent - Opens the document in the parent frame
  4. _top - Opens the document in the full body of the window
22
Q

What are absolute and relative URLs?

A

Absolute URLs - a full web address
Relative URLs - a link to a page within the same website

23
Q

How to use an image as a link?

A

To use an image as a link, just put the <img></img> tag inside the <a> tag:</a>

<a>
<img></img>
</a>

24
Q

How to link an email address?

A

Use mailto: inside the href attribute to create a link that opens the user’s email program :

<a> Send Mail </a>

25
What is the default behaviour for links in html?
An unvisited link is underlined and blue. A visited link is underlined and purple. An active link is underlined and red.
26
How to add a bookmark?
First, use the id attribute to create a bookmark:

Chapter 4

Then, add a link to the bookmark ("Jump to Chapter 4"), from within the same page: Jump to Chapter 4
27
How to add an image map with an image?
With the use of usemap : Sample
28
What shapes define an area for an image map?
rect - defines a rectangular region circle - defines a circular region poly - defines a polygonal region default - defines the entire region
29
How to add a favicon in html?
A favicon image is displayed to the left of the page title in the browser tab Use the HTML element to insert a favicon
30
What are the tags for table headers, cells and rows
- for table headers - for table cells - for table rows
31
Draft a simple table with table headers, rows and cells
Person 1 Person 2 Person 3
Emil Tobias Linus
16 14 10
32
How to add an unordered list in HTML?
An unordered list starts with the
    tag. Each list item starts with the
  • tag.
33
How to set a specific size for a row in a table?
Firstname Lastname Age
34
How to add vertical table headers?
To use the first column as table headers, define the first cell in each row as a element :
Firstname Jill Eve
35
How to add an ordered list in HTML?
An ordered list starts with the
    tag. Each list item starts with the
  1. tag.
36
How to add a description list in HTML?
A description list is a list of terms, with a description of each term. The
tag defines the description list, the
tag defines the term (name), and the
tag describes each term
Coffee
- black hot drink
Milk
- white cold drink
37
What are Block-Level elements? Give examples.
A block-level element always starts on a new line, and the browsers automatically add some space (a margin) before and after the element and takes up the full width available. Examples -

and

38
What are inline elements? Give examples
An inline element does not start on a new line and takes up width as much as necessary. Example -
39
Is class element sensitive?
Yes
40
Can you add multiple elements in one document? Also write syntax for element.
Yes First - . Then class name For Example .city
41
Can you add multiple elements in one document? Also write syntax for element.
No First - # Then class name For Example #city
42
What is
44
How to set/alter keyboard input in html
The HTML element is used to define keyboard input. The content inside is displayed in the browser's default monospace font.

Save the document by pressing Ctrl + S

45