HTML Flashcards
Study HTML code
What does HTML stand for?
Hypertext Markup Language
What is the purpose of HTML?
HTML is used to design and organize information and web pages on the internet.
What is the opening tag in HTML?
The opening tag is the tag that begins an element. It begins with a less-than sign ( < ) and ends with a more-than sign ( > )
What is the closing tag in HTML?
The closing tag is what closes an element. It begins with a less-than ( < ) and ends with a more-than sign ( > ). Before the content is a slash ( / ).
What is the content in an HTML element?
The content is the text between the opening and closing tabs.
What is an HTML element?
An element is everything from the opening tab to the closing tab.
This root HTML element defines the whole HTML document.
<html></html>
This root HTML element makes elements within this one invisible on the front end of the webpage. It is sort of like “behind-the-scenes”
<head></head>
This element is for internal CSS and is in the <head></head>
section.
<style></style>
This element is used to give a title to a webpage and is in the <head></head>
section.
<title></title>
This tag defines the relationship between a document and an external source, often for stylesheets or favicons. It contains the href and rel attributes.
<link>
Which elements are used for headings?
<h1></h1> <h2></h2> <h3></h3> <h4></h4> <h5></h5> <h6></h6>
Which element is used for paragraphs?
<p></p>
Why should you use <!DOCTYPE html>
?
It helps the browser to interpret the HTML code and display it correctly.
Which element is used for links?
<a href = ""><a>
The <a>
tag is for hyperlinks. The href attribute specifies the link’s URL.
Which tag is used for displaying images?
<img src = "">
The <img>
tag is for images. The src attribute specifies the path to the image or its address.
Which attribute is for specifying an alternative text for an image that cannot be displayed?
alt
Which attribute is for decorating an element?
style
Which attribute declares the language of a web page or an element?
lang
Which attribute defines extra information about an element?
title
Fun fact: if you hover over an element with a title, the title will display around the cursor.
Which element makes text bold without adding importance?
<b></b>
Which element defines a text with strong importance while also bolding it?
<strong></strong>
Which element italicizes text for visual effect (character thoughts, scientific names, etc.)?
<i></i>
Which element emphasizes (stresses) text and makes it important?
<em></em>
Which element makes text smaller?
<small></small>
Which element makes texts marked or highlighted?
<mark></mark>
Which element deletes and also strikes a line through text?
<del></del>
Which element inserts and also underlines text?
<ins></ins>
Which element makes text subscript?
<sub></sub>
Which element makes text superscript?
<sup></sup>
Which element defines a quote from another source?
<blockquote></blockquote>
When adding a blockquote, include the cite attribute to cite your source.
~~~
<blockquote></blockquote>
~~~
Which element defines short quotations?
<q></q>
Which element defines an abbreviation?
<abbr></abbr>
Which element defines contact information (name, address, email, etc.)?
<address></address>
Which element defines the title of a creative work (artwork, book, movie, painting, poem, sculpture, etc.)?
<cite></cite>
Which tag defines a comment? They can be used to hide content temporarily or for ideas and reminders.
<!-- -->
Which attribute opens a linked page on the same tab it was clicked on?
_self
This is used in the target attribute.
Which attribute opens the page in a new document or tab when clicking a link?
_blank
This is used in the target attribute.
Which attribute opens the document in a parent frame?
_parent
This is used in the target attribute.
Which element displays the page in the full body of the window?
_top
This is used in the target attribute.
Which href link allows the user to send an email?
mailto
This is used in the href attribute.
Which element creates an unordered list?
<ul></ul>
Tip: Unordered List = ul
Which element creates an ordered list?
<ol></ol>
Tip: Oordered List
Which element defines a description list?
Tip: A description list is a list of items, each one having a description
<dl></dl>
Tip: Description List
Which element defines a term in a description list?
<dt></dt>
Tip: Description Term
Which element defines a description in a description list?
<dd></dd>
Tip: Description List Description
Which element defines a term in a regular list?
<li></li>
Which attribute defines a list item marker in an ordered list?
type
Types of types:
type = “1”– List will be numbered
type = “A”– List will be numbered with uppercase letters
type = “a”– List will be numbered with lowercase letters
type = “I”– List will be numbered with uppercase Roman numerals.
type = “i”– List will be numbered with lowercase Roman numerals.
Which attribute will begin a list with a specific number?
start
What is a block element?
A block element always begins on a new line and takes up as much width as possible.
Two commonly used block elements are <p></p>
and <div></div>
What is an inline element?
An inline element, unlike a block element, does NOT start on a new line. It takes up as much width as possible.
An example of an inline element is <span></span>
Which element divides and contains other HTML elements?
<div></div>
Which element is used to mark up or often style a part of a text or document?
<span></span>
Which attribute specifies a class for an HTML element?
class
What is the syntax for class?
.(class name)
How do you define multiple classes in an HTML element?
Separate the class names with a space in the value of the class attribute.
Which attribute specifies a specific identity for an HTML element?
id
What is the syntax for id?
(id name)
What is the difference between class and id?
Class is used for multiple elements.
Id is used for one.