HTML Flashcards
HTML stands for
Hyper Text Markup Language
Declaration that defines that this is an HTML5 document.
“!DOCTYPE html”
The entire document is surrounded by what?
html tags
What is the HTML links tag? And what do you use to give the link’s destination?
<a>Words here</a>
What tags is the visual part of the HTML document between?
Body tags
What do you use to make HTML headers and what range do they go through?
<h1>...<h6>
| Head tags</h6></h1>
What is the HTML paragraphs tag
<p></p>
What is the HTML links tag? And what do you use to give the link’s destination?
<a>Words here</a>
What is the HTML images tag? And what are common attributes to go with it?
“img” tags. The source file is defined by src. The alternative text is defined by alt. And you can choose the width and height with simply width and height.
What is an HTML element defined as?
An HTML element is defined by a start tag, some content, and an end tag
True or False: HTML elements can be nested
True
What is an Empty HTML element and give me an example
HTML elements with no content are called empty elements, they don’t use closing tags. <br></br> is an example of an empty HTML.
What do HTML attributes do?
HTML attributes provide additional information about HTML elements
What HTML elements can have attributes?
All HTML elements
Where are attributes specified?
Attributes are always specified in the start tag
What attribute does an “a” tag use to get the url of the page link?
href
The src attibute is commonly used for what tag?
The img tag
What is an Absolute URL/Path?
An absolute URL/Path links to an external image/page that is hosted on another website
What is a Relative URL/Path?
A relative URL/Path links to an image/page that is hosted within the website. You can use no slash to reach content relative to the current page, or you can use a slash for content relative to the whole domain.
How do you specify the height and width of an image?
Inside the img tag you use the width and height attributes (in pixels).
What is the alt attribute used for?
The alt attribute is a required attribute for the img tag that specifies an alternate text for an image, if the image cannot be displayed or the if they user uses a screen reader.
What attribute would you use to add things suck as color, font, size and more to your element?
The style attribute
What is the lang attribute and where does it go?
The lang attribute should always be inside the html tag, to declare the language of the Web page.
Can you add more than just the basics to the lang attribute?
Yes. You can not only include the language code, but also the country codes (i.e. “en-US”).
How would you make a tooltip?
By using the title attribute, which defines some extra information about an element, you create a tooltip for when the element is moused over.
What is the hr tag?
The hr tag defines a break in an HTML page, and is most often displayed as a horizontal rule.
What tag defines a line break? Similar to an hr tag but can be used within paragraphs as well
The br tag.
What does the pre tag do?
The pre element defines preformatted text. This means the text inside a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
What tag(s) could be used for bold-like text?
“b” or “strong” tags
What tag(s) could be used for italic-like text?
“i” or “em” tags
What tag(s) could be used for highlighted text?
“mark” tags
What tag(s) could be used for small sized text?
“small” tags
What tag(s) could be used for text that is crossed out?
“del” tags
What tag(s) could be used for underlined text (to be inserted)?
“ins” tags
What tag(s) could be used for subscript and superscript text?
“sub” tags for subscript.
“sup” tags for superscript.
What is another name for a tag in html?
An element
What is the “blockquote” element for?
The “blockquote” element defines a section that is quoted from another source. (Browsers usually indent this element.)
What tag do you use to define a short quotation?
“q” tag
What tag would you use with the title attribute to show the full name of an acronym or abbreviation?
The “abbr” tag
What does the “address” tag do?
The “address” tag defines the contact information for the author/owner of a document or an article. (The text in the “address” element usually renders in italic, and browsers will always add a line break before and after the address element.)
What happens when you use the “cite” tag?
The tag will usually render in italic, defining the title of a creative work.
In an odd situation where you would want text to be written from right to left, how would you do that?
By using the “bdo” (Bi-Directional Override) tag, that is built for this.
How do you add comments for HTML?
The comment tags for html are as follows:
HTML colors are specified with what?
Predefined color names, RGB, HEX, HSL, RGBA, or HSLA values
What does RGB stand for?
Red, Green, and Blue light sources
What does HSL stand for?
Hue, Saturation, and Lightness
What is HEX for colors?
Hexadecimal color is specified with: #RRGGBB (R = red) (G = green) (B = blue)
What does the A stand for in RGBA and HSLA?
For both the A stands for Alpha channel, which controls the opacity.
What 3 basic html attributes deal with colors and what are they used for?
Background Color is created with the “background-color” attribute. Text Color is created with the “color” attribute. Lastly, you can control the Border Color with the “border” attribute.
What tag and attributes do you use to connect with a CSS file?
“link” is the tag. “rel = ‘stylesheet’” is what is used to note that you are linking to a Cascading Style Sheet. “href” is where you put the file path to get to your css file.
Where will a linked page display by default?
The current browser window.
What attribute is used to specify where to open a link?
“target” attribute
What options does the “target” attribute have?
“_self” (default) opens in the same window and tab.
“_blank” opens the document in a new window or tab.
“_parent” opens the document in the parent frame.
“_top” opens the document in the full body of the window.
What can you use to send an email with the “href” attribute?
By putting “mailto:” inside the “href” attribute, followed by the email address you wish to send it to.
What are the 4 different stages a HTML link can be displayed at?
Visited, unvisited, hover, or active. (a:visited, a:link, a:hover, a:active)
How do HTML Bookmarks work?
By using an id and href attribute you link to the id whether it’s on the current page or not.
Example: (for current page)
id=”C4”
href=”#C4”
What attributes are required for the “img” tag?
src and alt