HTML and CSS Flashcards

1
Q

What is HTML?

A

A format that tells a computer how to display a web page. The documents themselves are
plain text files with special “tags” or codes that a web browser uses to interpret and display
information on your computer screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
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
3
Q

What should a HTML file have ?

A

A HTML file extension

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

What is <!DOCTYPE…>

A

This tag defines the document type and HTML version.

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

<html>
</html>

A

This tag encloses the completeHTML document and mainly comprises of documents header which is represented by <head> … </head> and document body which is represented by <body > … /< /body> tags.

Goes at start and end of page

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

<head>
</head>

A

Tag that Represents document header, which can keep <title> <link></link> etc.</title>

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

<title>
</title>

A

Tag that is used inside <head> tag , to mention document title

Appears on the browser window

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

<body>
</body>

A

Tag that keeps other tags eg: <h1> <div> <p> etc
It so visible content on webpage.

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

<h1>
</h1>

A

Tag represents heading on webpage

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

<p>
</p>

A

Tag represents paragraph

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

<b></b>

A

Tag for bold text

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

<i></i>

A

Tag for italics

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

<strong></strong>

A

Tag displays strong text
Similar to bold

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

What is the largest heading <h1> to <h6>

A

<h1> is the largest heading
<h6> is the smallest heading
</h6></h1>

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

<ul>
</ul>

A

Unordered list, bullet pints
Each point starts with <li>

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

<ol>
</ol>

A

Ordered list, each item begins with a number and <li>

17
Q

<img></img>

A

<img scr=“url” alt=“sometext” style=“width:width;height=height”>

<img scr=“html5.gif” alt=“HTML5” style=“width:128px;height=128px”>

18
Q

Hyperlinks

A

Alow visitors to navigate between websites by sticking words or phrases and images

<a href=“url”>link text</a>

19
Q

What is CSS

A

A design language that can make a web page more presentable. controlling the colour, font style, spacing between paragraphs, how columns are sized and laid out etc

20
Q

What’s does CSS stand for

A

Cascading Style Sheets.

21
Q

Why CSS?

A

• Formatting instructions separated from document mark-up
• HTML can be more clean and well-structured
• Adding and editing content is easier
• Style sheet handles formatting automatically
• Consistent styles across a set of pages
• Different style sheets can be used for the same content
• CSS offers much richer formatting than HTML
• Browsers that do not support CSS can still use the page
• Recommended, standard way of formatting HTML documents
• CSS Separates Content from Form

22
Q

Advantages of CSS

A
  • makes website more flexible:
    CSS is reusable. Change style sheet to change design of many pages

-easier to maintain
Cleaner HTML code
Separates style from HTML tags and page content
Considers look across entire website that is easily maintained by changing style in one place.

23
Q

Disadvantages of CSS

A

Not informally supported by all browsers
Firefox, chrome ,safari adhere to CSS standards more than IE

24
Q

What are the three parts of a style rule.

A
  • selector, the tag where the style will be applied. Eg : h1 or p
    -property the type of attribute of HTML tag.
    Eg: colour border etc
    -value eg red etc

H1{font-size:x-large;colour:red}

25
Q

Three ways to include CSS

A

Inline style sheet = useful for one off that are not likely to be used elsewhere.

Internal style sheets= simple to use. Style ink in each page in <head> section are set out in <style> tags.</style>

External style sheet= often the most practical method. Style info is held in a separate file. File has .css extension

26
Q

What is a tag selector

A

It is used to redefine existing HTML tags . If you want to change the formatting option for an HTML tag.

27
Q

What is class selector

A

It is the most versatile selector option. It can be used to format any element (from text to image to multimedia) can be used as many times as you like on any page in a web.

Contains no spaces or special characters.

Eg
Selector.classname{property1; property2:value2}
P.special{text-align:right;colour:green;}

In HTML file assign to tag with class attributes class =“classname”
<p class=“special”>A different class of paragraph</p>

28
Q

What is ID selector

A

ID style must begin with # ,,,,,,,,,,,,

29
Q

Colour codes

A

Using RGB colour codes, represent as hexadecimal values From 000000 to FFFFFF

<body bicolor=“#FFFF00”></body>

30
Q

CSS rule cascade

A

What if more than one style decloration applies to a property of an element?

The rule determines which style rules decollation applies

31
Q

HTML Validation

A

It compares the HTML code in the web page with the rules of the accompanying doctype and tells you if and where those rules have been broken.

Che is the page against the rules