Basics Flashcards
What is basic html format ?
<!DOCUMENT html>
What is a html tag ?
An element name surrounded by a bracket
What makes up an html element?
A start tag, element content, and an end tag
What do you call an element that Is inside another element ?
A nested element
What is an empty element?
An element that has no element content or end tag. You close them with a foward slash on the open tag
What makes up an html attribute?
An attribute name, an equal sign, and a value within quotation marks
What is the lang attribute for ?
To define the language of an html file
How do we create links in html ?
We use the <a> element which defines links, and the href attribute which tells a browser where to go</a>
What is the title attribute for ?
It provides a tool tip for html elements / text that appears when something is hovered over
What is the style attribute for ?
Adjusting size font and color
What are the I’d and class attributes for ?
They give reference to attributes inside an element
What is special about the class attribute ?
Multiple elements can have the same class value
What’s special about the I’d attribute
It must be unique for every element
What are html comments and their purpose ?
Text or phrases inside an html file which help developers organize code
What makes up an internal style sheet ?
One or more css ( cascading style sheet) rule sets
What makes up a css rule set ?
A selector and declaration block surrounded by curly/pelican brackets with css declarations separated by semi colons
Example of a selector
P { }
Example of a declaration block
{ }
Example of a css declaration
Font size: 14px;
What does each css declaration include ?
A css property name and value
What elements always contain a css rule aet ?
The head and style elements
What is the difference between internal and inline styling ?
Internal styling is for meta data. Inclined styling is for what you will see on your web browser
How are html colors defined?
hex color value, rbg color value, color name
What do rgb color value numbers represent?
The intensity of the colors
What attribute is used to make an html page responsive ?
Metaname = “view port”
Hex color value example
f
Rbg color value example
Rbg (255,255,255)
How is html text centered
Using the style = “text align : center” attribute
What is the “div” tag used for ?
To make divisions of content on a web page
How do you create a line break in html ?
The <br></br> tag this is an empty tag
Example of hr element styling ?
< hr style = width: “50%” color = “black”
How do you draw a line in html
The < hr / > tag. This is an empty tag
What is a block level element
An element that creates a horizontal boundary block and always starts on a new line. (On the browser)
What are in line elements ?
Elements that don’t create new lines on the browser.
Block level element output example
Hello
Iam
A sentence
What are html sections and what elements are used for them ?
Html sections Group different html elements. The Div and span elements are used to do this
Difference between div and span ?
Div is a block level element used to group large groups of elements. and span is an inline element used for smaller groups
What are the semantic elements and do you have to use them ?
Nav, main, header, footer, and no but they’re good for seo
What is the point of the alt attribute
Providing an alternative image attribute in case the src attribute doesn’t work
How do we resize an image in html ?
The lengtha and width attribute
How do we float an image ?
The style = “float”:right or left attribute
How would you code the div element different than the span element?
Paragraphs elements are nested inside the div element, and the span element nests inside the paragraph element
How do we create images ?
With the <img></img>