HTML Flashcards
What does HTML stand for?
HyperText Markup Language
What does HTML do for a web page?
Builds webpage structure and content through code.
Stand alone stentence Ex: My cat is very grumpy
<p>My cat is very grumpy</p>
What is an element?
A part of a webpage. It may contain a data item or chunk of text, an image or nothing.
Contains an opening tag with attributes, enclosed text content, and closing tag
Ex: <p class="nice">Hello world!<p>
What is a tag?
A tag is what is used to create an element. There is an opening and end tag.
Opening Ex: <p>
Ending Ex: </p>
What is an attribute?
It is extra information that defines how the element will behave/look without that command appearing in the final content
Ex: <p class="editor-note">My cat is very grumpy</p>
Class is the attribute name and editor-note is the value
What is it called when you put elements inside other elements?
Nesting
Ex: <p>My cat is <strong>very</strong> grumpy.</p>
What is a void element?
One that does not have any content, nested elements or text nodes. Does not have an end tag
Ex: <area></area>
<base></base>
<br></br>
<col></col>
<embed></embed>
<hr></hr>
<img></img>
<input></input>
<link></link>
<meta></meta>
<param></param>
<source></source>
<track></track>
<wbr></wbr>
What do you have to type first when creating your HTML?
<!DOCTYPE html>, then
<html></html>
, including lang
What does <head></head> contain?
It wraps all the content on the entire page that is not what you want the end user to see. This includes keywords, CSS, character set declarations and more
What is the purpose of <meta charset=”utf-8” ?
This element sets the character set your document will use to UTF-8, which includes most characters from the majority of written languages
What viewport element makes sure the page renders at the width of viewport, preventing mobile users from experiencing wider pages than their screen?
<meta></meta>
Use of <title></title> element ?
Sets the title of your webpage. The title that appears in the browser tab, or when bookmarked
What element shows content to the user?
<body></body>
Why use the alt attribute?
To read alternate text explaining an image to visually impaired users.
To have alternate text in place of the image not displaying due to an error
How do you write headings?
<h1>My main title</h1>
<h2>Top level heading</h2>
<h3>Subheading</h3>
<h4>sub subheading</h4>