HTML/CSS/JS Flashcards

1
Q

What is HTML?

A

Hyper Text Markup Language is a standard markup language for web pages. It contains HTML elements, represented by tags, which tell browser how to display content.

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

Explain HTML tags.

A

HTML elements are represented by tags, which are element names surrounded by angle brackets. They normally occur in pairs and end tag starts with forward slash.

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

Do all HTML tags occur in pairs?

A

No.

The HTML body and title tags are in pairs whereas the image and break tags are not.

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

What are the common lists used in HTML pages? Explain each one.

A

Ordered: list starts with < ol > tag and every list item starts with < li > tag.

Unordered: list starts with < ul > tag and every list item starts with < li > tag.

Definition: used to create list of items with their descriptions. List starts with < dl > tag, < dt > defines the term and < dd > describes every term.

Menu: only supported by Firefox. List starts with < menu > tag and each item starts with < menuitem > tag

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

How to insert a comment in HTML page?

A

< ! – comment – >

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

What are image maps?

A

With HTML image maps, we can create multiple clickable areas on image such that single image containing computer, phone and TV can open different pages if you click on computer or on phone or on TV.

In the <img></img> tag we provide a usemap attribute usemap whose value must start with # symbol and refer it in a tag bearing the same name attribute as usemap in image tag.

Inside tag we provide various areas specifying their co-ordinates, shapes and either Javascript function (onclick) or link it to some other HTML page.

The areas start with tag.

The shapes can be rectangular, circular, polygonal or default (entire region).

If the shape is rectangular, the co-ordinates are one pair for x-axis and one for y-axis where each pair has two points, first one from left margin and next one from top margin (all in pixels). For eg. 34,44,270,350.

If the shape is circular, we first give the center of area as pair and then radius (all in pixels).

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

How to create links to sections withing same page?

A

Inside the <a> tag we can either use #top or #bottom to go to page top or bottom as an href value</a>

or we can give ID selector of an HTML element to </a><a> tag’s href so that we move to that element.</a>

For eg. <p></p>
</a><a></a>

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

What does the attribute β€˜alt’ do in <img></img> tag?

A

It displays alternate text of the image if image cannot be displayed by browser.

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

Does a hyperlink apply to text only?

A

No, we can use it with images as well by surrounding image with <a> tag.</a>

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