HTML Flashcards

(45 cards)

1
Q

?What are some simple HTML formats

A

Headings <h1> to <h6>

Paragraphs <p> </p>

Links <a href=”http://some.com”>Label</a>

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

What is the basic HTML syntax for an element?

A

Start tag.

End tag.

Element content

Most elements have attributes.

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

What does

<html>

</html>

represent?

A

The <html> element defines the whole HTML document.

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

What is an HTML attribute?

A

Attributes provide additional information about HTML elements.

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

What part of the element are attributes defined?

A

.Attributes are always specified in the start tag

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

What is the general syntax of an attribute?

A

Attributes come in name/value pairs like: name=”value”

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

What is the tag for an HTML link?

A

HTML links are defined with the <a> tag.

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

What attributes are standard for most HTML elements?

A

class , classname, Specifies a classname for an element

id, id Specifies a unique id for an element.

style, style_definition, Specifies an inline style for an element

title, tooltip_text, Specifies extra information about an element (displays as a tooltip)

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

What should headings be used for?

A

Headings Are Important

Use HTML headings for headings only. Don’t use headings to make text BIG or bold.

Search engines use your headings to index the structure and content of your web pages.

Since users may skim your pages by its headings, it is important to use headings to show the document structure.

H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on.

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

How can you make a horizontal line?

A

The <hr /> tag creates a horizontal line in an HTML page.

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

How can you make a comment in HTML?

A

<!– This is a comment –>

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

What does the <p> tag represent?

A

Paragraphs are defined with the <p> tag.

Forgetting the end tag can produce unexpected results or errors.

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

How can you create a line break?

(Create a new line without starting a new paragraph?)

A

<br> or <br />

In XHTML, XML, elements with no end tag (closing tag) are not allowed.

Even if <br> works in all browsers, writing <br /> instead works better in XHTML and XML applications.

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

Where can you find information on HTML?

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

What are the three main categories of formatting tags?

A

Text formatting

Computer output

Citation, quotation and definition

Each of these categories has a number of tags that create certain formatting in an HTML document.

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

What are the HTML text formatting tags and what do they do?

A

<b> Defines bold text
<big> Defines big text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines small text
<strong> Defines strong text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text

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

What are the “computer output” tags and what do they do?

A

<code> Defines computer code text
<kbd> Defines keyboard text
<samp> Defines sample computer code
<tt> Defines teletype text
<var> Defines a variable
<pre> Defines preformatted text

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

What are the citation, quotation and definition tags and what do they do?

A

<abbr> Defines an abbreviation
<acronym> Defines an acronym
<address> Defines contact information for the author/owner of a document
<bdo> Defines the text direction
<blockquote> Defines a long quotation
<q> Defines a short quotation
<cite> Defines a citation
<dfn> Defines a definition term

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

What tag is used in place of the depricated ‘font’ tag?

A

Use CSS. Cascading sheet styles.

example:

<html>
<body>

<h1 style=”font-family:verdana”>This is a heading</h1>
<p style=”font-family:courier”>This is a paragraph.</p>

</body>
</html>

20
Q

What is CSS and what is it used for?

A

CSS was introduced together with HTML 4, to provide a better way to style HTML elements.

CSS can be added to HTML in the following ways:

in Cascading Style Sheet files (CSS files)
in the <style> element in the HTML head section
in the style attribute in single HTML elements

21
Q

How is the style attribute used and when should it be used?

A

It is time consuming and not very practical to style HTML elements using the style attribute.

The preferred way to add CSS to HTML, is to put CSS syntax in separate CSS files.

22
Q

What is the link syntax?

A

<a href=”url”>Link text</a>

23
Q

How do you specify an anchor in a link?

A

The name attribute specifies the name of an anchor.

<a name=”tips”>Useful Tips Section</a>

<a href=”url#tips”>Visit useful tips” </a>

24
Q

How do you create an image as a link?

A

Put it after the start tag and before the end tag where the text is normally used as a link.

The syntax for inserting an image is

<img src=”myimg.gif” />

26
How can you align an image in some text?
Use the align attribute. Valid values are bottom, middle and top, bottom is the default value. \An image \Smiley face with align="middle".\
27
How can you float an image?
\ \Smiley face A paragraph with an image. The align attribute of the image is set to "left". The image will float to the left of this text. \
28
How can you create an image map?
An image map in accomplished using the map tag and sub tags of area. The area attributes such as shape and coords define the 'live' areas. \ \Sun \Mercury \Venus \
29
What are the tags that are used to define an HTML table?
\ Defines a table \ Defines a table header \ Defines a table row \ Defines a table cell \ Defines a table caption \ Defines a group of columns in a table, for formatting \ Defines attribute values for one or more columns in a table \ Groups the header content in a table \ Groups the body content in a table \ Groups the footer content in a table
30
Which tags are used to define a list in HTML?
\ Defines an ordered list \ Defines an unordered list \ Defines a list item \ Defines a definition list \ Defines an item in a definition list \ Defines a description of an item in a definition list
31
Which tags are used in forms?
\ Defines an HTML form for user input \ Defines an input control \ Defines a multi-line text input control \ Defines a label for an input element \ Defines a border around elements in a form \ Defines a caption for a fieldset element \ Defines a select list (drop-down list) \ Defines a group of related options in a select list \ Defines an option in a select list \ Defines a push button
32
Where would you find an input element and what would it be used for?
\ elements are used within a \ element to declare input controls that allow users to input data.
33
What are some values for the 'type' attribute in an input tag?
* Button * Checkbox * FileUpload * Hidden * Password * Reset * Submit * Text
34
What are event attributes and what can they accomplish in an input attribute in a form?
Event attributes in an input tag will cause a specified script to be run. They are as follows: * onblur (element loses focus) * onchange * onclick * ondblclick * onfocus * onmousedown * onmousemove * onmouseout * onmouseover * onmouseup * onkeydown * onkeypress * onkeyup * onselect
35
How would you define a password field in a form?
\ Password: \ \
36
How is a form submitted?
Form information is sent to a server using the submit button. \ A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input: \
Username: \ \ \
37
What are the 2 types of methods in the methos attribute in a form tag?
get post Notes on the "get" method: * This method appends the form-data to the URL in name/value pairs * This method is useful for form submissions where a user want to bookmark the result * There is a limit to how much data you can place in a URL (varies between browsers), therefore, you cannot be sure that all of the form-data will be correctly transferred * Never use the "get" method to pass sensitive information! (password or other sensitive information will be visible in the browser's address bar) Notes on the "post" method: * This method sends the form-data as an HTTP post transaction * Form submissions with the "post" method cannot be bookmarked * The "post" method is more robust and secure than "get", and "post" does not have size limitations
38
How can you use a form to send an email?
\ Name:\
\\
E-mail:\
\\
Comment:\
\ \
\
\ \ \
39
How can you use group together elements in a form?
Use the fieldset attribute. ## Footnote \ \ \Personal information:\ Name: \\
E-mail: \\
Date of birth: \ \
\ Personal information: Name: E-mail: Date of birth:
40
What is the syntax for using radio buttons in an html form?
\ \ Male\
\ Female \
Male Female
41
What is the purpose of frames in an HTML document?
With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others. The disadvantages of using frames are: * Frames are not expected to be supported in future versions of HTML * Frames are difficult to use. (Printing the entire page is difficult). * The web developer must keep track of more HTML documents
42
What is an Iframe?
An iframe is used to display a web page within a web page. \