HTML 5 Flashcards
What is a text editor?
A text editor is a program that allows us to write code.
What does HTML stand for?
Hypertext Markup Language
What are the rules that every html file must follow (tags)?
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
What is the shortcut (in sublime) for quickly creating the default tags for html page?
Type html and hit the tab key.
<!DOCTYPE html>
All HTML documents must start with a <!DOCTYPE> declaration.The declaration is not an HTML tag. It is an “information” to the browser about what document type to expect.
What is the difference between a tag and an element?
HTML element is the collection of start tag, its attributes, an end tag and everything in between (content). An HTML tag (either opening or closing) is used to mark the start or end of an element
<b></b>
<b> tag is used to highlight in bold that part of the text, which we want to make more obvious for the user.</b>
<p>
</p>
This element creates a paragraph in html file.
<h1>
</h1>
This element creates a header in html file.
<strong></strong>
The strong element will bold a text. The <b> element was used in the past.</b>
<em></em>
The emphasis element will italicize text.
<ol>
</ol>
The <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical.
Ex:
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul>
</ul>
The <ul> tag defines an unordered (bulleted) list.
Ex:
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<li>
</li>
The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list ( <ol> ), an unordered list ( <ul> ), or a menu ( <menu> ).
What are nested list?
Nested list are list inside of list.
Ex:
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
What are self closing tags?
A self-closing tag in HTML is a kind of HTML tag that does not need to be closed manually by its closing tag, which means it does not have a separate closing tag as </tag>. An example of this is an <img></img> tag that allows you to add an image to a web page.
<br></br>
The <br></br> tag inserts a single line break. (There is no closing tag)
<hr></hr>
The <hr> HTML element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
The <hr> element is most often displayed as a horizontal rule that is used to separate content (or define a change) in an HTML page.
<img></img>
The <img></img> tag is used to embed an image in an HTML page.
Images are not technically inserted into a web page; images are linked to web pages. The <img></img> tag creates a holding space for the referenced image and it has a required attribute called src, which has to be the URL of the image.
What are the two required attributes for an <img></img> tag?
- src - Specifies the path to the image and must be set to the image’s source, or the location of the image. The value of src must be the uniform resource locator (URL) of the image leading to its local or web address.
- alt - Specifies an alternate text for the image, if the image for some reason cannot be displayed
What do attributes require?
Attributes require a name and a value.
Ex: <p lang= "en-us">Paragraph in English</p>
What are attributes?
An attribute in HTML provides additional information about an HTML element. It comes in a name and value pair with the structure name=”value”. For example, you can specify the width of an HTML element with the attribute width=”500”.
<a></a>
The anchor tag, used to specify the text that is the “anchor” for a link.
Ex:
<a>Learn to code!</a>
<button></button>
This is a button tag.
What is hypertext?
Hypertext is text that is linked to other text.
What does href stand for?
hyperlink reference
What is the href attribute?
Links are created in HTML with the href attribute.The href attribute allows us to specify the URL, or address on the web, that a link should take users to.
What are relative paths?
Relative paths are links to another page on the same website, so we can omit the first part.
Explain separation of concerns
separation of concerns is a design principle for separating a computer program into distinct sections such that each section addresses a separate concern.
What is the html link tag for?
An HTML link tag is often used to create a connection between an HTML file and the CSS file and tells the browser to apply the CSS styles to the HTML.
rel attribute
rel attribute specifies the relationship between the current document and the linked resource.
Ex:
<link></link>
What is an event?
An event is something that can happen in a browser, like clicking or hovering with your mouse.
How can attributes set events?
HTML attributes can set events, where the name of the attribute is the event and the value of the attribute is the JavaScript function that we want to execute.
Ex:
<button>Repaint</button>
What does SQL stand for?
SQL stands for structured query language.
What is the function of SQL?
SQL stores information in tables, which is simply a collection of information organized into rows and columns. I
What is programming?
programming is giving a set of instructions to a computer to execute.
What is the difference between programming and coding?
Programming is the mental process of thinking up instructions to give to a machine (like a computer) and coding is the process of transforming those ideas into a written language that a computer can understand.
HTML is a declarative language. How are declarative languages different than non-declarative languages?
Declarative languages tell an interpreter what to do, not how to do it.
What is the main goal of html?
The main goal of html is to structure a page.