HTML Flashcards
What does the tag represent?
The visible part of the HTML document
What is an element?
Everything between opening tag and closing tag . Including text and other child elements
Two parts of an element’s attributes?
name and value
What Attribute is available for all elements?
ID and lang
what do <b> and <i> tags do?</i></b>
make bold and italic, but now mainly used for emphasis. You can also use <strong> for bold and <em> for italic</em></strong>
what do and tags do?
subscript and superscript. although this is better done in CSS
define “empty element”
an element without text content
what is the <hr> tag?
Horizontal rule
How do you indent a whole section of text?
<blockquote></blockquote>
Two other tags to show bold and italic
<strong> and <em></em></strong>
what element does “cite” attribute go on?
a quote. Can be used to direct to the quotation’s source
How do you set an Acronym apart?
with the <abbr> tag. The title=”something” attribute of the abbr tag can then be used to explain the abbreviation when the user hovers over the text</abbr>
Tags to strike through and underline text?
<del> - strikethrough. <ins> - underline</ins></del>
how do you create multi-tiered lists
with <ul> or </ul><ol> tags within the <li> tag - which is always within an outer <ul> or </ul><ol></ol></li></ol>
Two types of Markup?
- structural - layout 2. semantic - inline. defining text format
word for full URL?
Absolute reference
opposite of full URL
Relative Reference
name for main folder of website?
Root folder
attribute of <a> that tells it to open in new window?</a>
target=_blank
What <img></img> attribute gives user info when they hover?
title=”something”
Two ways to display content elements?
block (takes own line) and inline (shares line with other elements)
three places to put images in markup?
before (outside), at start of or within text content
Name of vector image format?
SVG - Scalable Vector Graphics
Two tags for associating an image and caption
- outside tag. -within figure tag
Reasons to use GIF, PNG, or JPG?
GIF and PNG for simple graphics. PNG for simple graphics with transparency. JPG for more complex images (pictures)
<img></img> attribute that is being phased out?
size. Use CSS now
Default alignment for a text
center
keywords to have across multiple cells?
colspan=”numberOfColumns” and rowspan=”numberOfRows”
what tags surround the row?
what tags surround the body of a table?
what tags surround the footer of a table?
reasons for tags?
more accessible for screen readers. Also allows different styling in CSS for top and bottom of form
attributes of element?
action=”someScript.script” method=”getOrPost”
Reasons to use Get vs Post when submitting a form?
Get is good for sending small amounts of data (like a search term) to get info from the server. Post is good if you are sending a long string or more in depth or complex data (like an image)
default method of form submission?
get
Attribute to not use on new forms?
size. better to use CSS
Possible attributes of text input
type, id, name, placeholder
What should be the same and different for radio buttons?
Radio buttons in a group need to have the same name=”sameName” so that the code know they are associated (and that only one can be chosen). however, they need to have different values so that the code know what the user selected
How do you know if a radio button or checkbox is selected?
the checked= attribute is set to “checked”
Tags for a dropdown list?
- this would be a two-option dropdown
tags for file upload
what is the difference between and tags?
input is an empty element (can’t have other elements inside it) whereas a button can encompass other elements and text inside it (like an image)
Attributes for HTML5 form validation
- the last one is a binary attribute telling the browser that the field is required.
How do you give an element more than one class?
both within same quotation marks, separated by a space: class=”this that”
Examples of block and inline elements
block: div, paragraph, heading. inline: image, form elements
Difference between div and span
div is a block item. span is inline
Attributes of an iframe
src, height, width
How to tell search engines not to index page?
what is the meta attribute pair?
either name/content or http-equiv/content
what are some common Meta Tags
name=”description”/content=”theDescription”, name=”keywords”/content=”theKeywords”, name=”robots”/content=”noindex”, http-equiv=”pragma”/content=”nocache”, http-equiv=”author”/content=”author’sName”
Ten escape characters (characters that you can’t put in HTML text because the browser might think it was code)
& = & " or ' = “ ” ‘ ’ multiply or divide symbols = ÷ × copyright symbol = © trademark symbol = ™ greater than symbol = > less than symbol - <
How do you begin and end writing an escape character?
start with & and end with ; For instance: > is >
what does in the first part of the document do?
It tells the browser what version of HTML the document is.