Nedzad Altumbabic Practice Test
Nedzad Altumbabic Practice Test
SECTION 1
<header> </header>
3. Write the correct HTML tag to define an input field for an email address.
<input type=“email“>
4. What is the correct HTML tag for defining a section of the document that can be reused
in multiple places?
<section> </section>
5. Write the correct HTML tag to define a line of code or programming instruction.
<sub> </sub>
<footer> </footer>
8. What is the correct HTML tag for defining a dropdown menu item?
<select> </select>
<img> </img>
10. What is the correct HTML tag for defining a hyperlink that opens a new window?
target=“_blank“
<ol> </ol>
<cite> </cite>
13. Write the correct HTML tag to define a text field for entering a URL.
<text-field
14. What is the correct HTML tag for defining a section of the document that contains
metadata about the document?
<meta charset=“utf-8“>
Text-align:cemter;
16. What is the correct HTML tag for defining a highlighted text?
<audio> </audio>
18. What is the correct HTML tag for defining a section of the document that contains a
quote or citation?
<q> </q>
<video> </video>
20. What is the correct HTML tag for defining a text area for entering multiple lines of text?
SECTION 2
1. Write the CSS code to set the font family of a paragraph to "Arial".
p{
font-family:arial;
font-size:
3. Write the CSS code to set the font weight of a heading to bold.
Heading {
Weight:bold;
color:
5. Write the CSS code to set the background color of a div to #f1f1f1.
Div {
Background-color: #f1f1f1;
widht
7. Write the CSS code to set the height of an image to 200 pixels.
Image {
Height:200px;
padding
9. Write the CSS code to set the margin of a div to 20 pixels.
Div {
Margin: 20px;
10. What is the CSS property used to set the border of an element?
border
11. Write the CSS code to set the text alignment of a paragraph to center.
P{
Text-align:center;
12. What is the CSS property used to set the line-height of an element?
Line-height
13. Write the CSS code to set the text decoration of a link to none.
.a {
Text-decoration:none;
14. What is the CSS property used to set the opacity of an element?
opacity
15. Write the CSS code to set the background image of a div to "image.png".
Div {
Background-image:img(image.png);
16. What is the CSS property used to set the display property of an element?
Display:
17. Write the CSS code to set the font style of a text to italic.
Text {
Font-family:italic;
18. What is the CSS property used to set the z-index of an element?
19. Write the CSS code to set the box-shadow of a div to 2px 2px 5px #888888.
div {
20. What is the CSS property used to set the text-transform of an element?
Text-transform
SECTION 3
1. Write the HTML code for a form with a text input field and a submit button.
<input type=“button“>
2. Write the CSS code to set the font size of all table cells to 16px.
Table {
Font-size:16px;
3. Write the HTML code for a table with two columns and two rows, where the first row
contains column headers and the second row contains data.
<table>
<tr>
<th>headers</th>
<td> </td>
</tr>
<tr>
<th>data</th>
<td> </td>
</table>
4. Write the CSS code to center align the text of all list items.
li {
text-align:center;
5. Write the HTML code for an ordered list with three list items.
<ol>
<li></li>
<li></li>
<li</li>
<li</li>
</ol>
6. Write the CSS code to set the background color of all even table rows to light gray.
7. Write the HTML code for a select element with three options: red, green, and blue.
8. Write the CSS code to set the font weight of all headings to bold.
Heading {
font-weight:bold;
9. Write the HTML code for a textarea element with 5 rows and 10 columns.
10. Write the CSS code to set the color of all links to blue.
a{
color:blue;
SECTION 4
1. Write the CSS code to create a box with a width of 200px, a height of 100px, a border
thickness of 2px, a solid black border color, and a solid blue background color.
2. Write the CSS code to center align a box horizontally within its parent container.
3. Write the CSS code to create a box with a width of 200px, a height of 100px, a padding of
20px on all sides, and a border thickness of 2px.
4. Write the CSS code to create a box with a width of 200px, a height of 100px, a margin of
50px on all sides, and a border thickness of 2px.
Box {
Width:200px;
Height:100px;
box {
width:200px;
height:100px
margin-top: 50px;
margin-bottom:50px;
margin-right: 100px;
margin-left: 100px;
SECTION 5
1. Write the CSS code to create a flex container with a direction of row and wrap set to
wrap.
2. Write the CSS code to align items in the center of a flex container.
3. Write the CSS code to distribute items evenly along the main axis of a flex container.
4. Write the CSS code to give an item in a flex container a fixed width of 100px and a flex-
grow value of 1.
5. Write the CSS code to give an item in a flex container a fixed width of 100px and prevent
it from shrinking or growing with flex-shrink and flex-grow properties set to 0.
SECTION 6
1. Write the CSS code to create a red heading with a font size of 36px and a line height of
1.5.
2. Write the CSS code to center a paragraph of text horizontally within its parent container.
3. Write the CSS code to add a 2px solid border to an image and position it 10px from the
top and right edges of its container.
4. Write the CSS code to create a link that changes color to blue when hovered over.
5. Write the HTML and CSS code to create a paragraph of text with a background color of
yellow, white text color, and a line height of 1.5.
H1 {
Color:red;
Font-size: 36px;
Line-height:1.5;