2.2. Intro to HTML/CSS: Making webpages Khan academy Flashcards
What grouping tags do you know in HTML?
For grouping together in a box several elements: “
”
For text : “ “
Which CSS decalaration sets the overflow of text in a box?
overflow:
overflow-x:
overflow-y:
What attributes can have the overflow declaration in CSS?
visible
hidden
auto
What declarations would you use in CSS to set the dimentions of a box?
width: 70%; or width: 200px;
height: 180px; or 80%;
Whitch are the elements of a box model?
Content
Padding
Border
Margin
What CSS declaration can you use to set the position of a box to the top left 30 pixels from left and 50 pixels from the top?
position: absolute;
top: 50px;
left: 30ps;
if you have two pictures please tell us how can you set picture one on top if picture 2?
picture 1’s CSS declaration:
z-index: 2;
picture 2’s CSS declaration:
z-index: 1;
What CSS declaration do you use to float a box to the left or to the right?
float: left;
or
float: right
Ho doyou position a footer box to be at the bottom of the floated elements of the webpage?
We can use the CSS declaration:
clear: both;
How do you set the with of a flaoted box?
It is recommended to use procentage instead of pixels in the CSS declaration:
with: 30%;
Please write the script for a CSS descendent selector that would like to style a strong tag in a paragraph.
p strong { }
Please write the script for a CSS descendent selector that would like to style a strong tag in a line of an ordered table.
ol li strong { }
Please use a combined CSS and class selector to style a paragraph that has the class name brain.
p.brain { }
Please use a combined CSS and class selector to style the elements (the tags) in a paragraph that has the class name brain.
p .brain { }
What are pseudo classes?
Are classes that a re recognised by the browsers.
Ex hover (when hovered over an element), clicked (when clicked), focus (at the moment of clicking).
Syntax:
a:hover {
background-color: rgb(255, 214, 255);
}