What does HTML stand for?
HyperText Markup Language
What does CSS stand for?
Cascading Style Sheets
Which tags are used to create headings in HTML?
<h1> to <h6>
Which property changes the size of the text?
font-size
Write the CSS rule to change the color of all headings to blue.
h1, h2, h3, h4, h5, h6 { color: blue; }
Which tag is used to create a hyperlink?
<a> tag
Which property is used to change the background color?
background-color
How do you create a list with bullet points?
<ul> for unordered list
Ex:
<ul>
<li>....</li>
</ul>
Name a CSS property used to align text in the center.
text-align: center
How do you add a border of 2px solid black to an element?
border: 2px solid black;
What attribute in the <img> tag specifies the image file?
src
selector/tag name
{
property:value;
}
What tag is used to create a table row?
<tr>
How to access a class and an id attribute in CSS?
class attribute with a dot before the classname
id attribute with a hashtag before the id name
Write the HTML code to create a table with one row and two cells.
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
</table>
Name the two required/mandatory tags in every HTML document.
<html> and <body>
How do you link a CSS file to an HTML document?
<link rel="stylesheet" href="styles.css">
What does the <br> tag do?
Inserts a line break
What color will the text be displayed in if the values in RGB are 255,0,0?
Red
Write the HTML and CSS to style a table so that its borders are visible.
HTML: <table class="styled-table"><tr><td>Content</td></tr></table>
CSS:
.styled-table { border: 1px solid black; }
Which attribute is used to give a unique identifier to an HTML element?
id
Which CSS property is used to align the image to right?
float:right
Which attribute specifies alternative text for images?
alt
What is the difference between id and class in CSS?
id is unique and for one element, class can apply to multiple elements.
Write the HTML and CSS to style a heading using class attribute.
HTML:<h1 class="heading"> Welcome </h1>
CSS:
.heading{
font-size:24px;color:red;
}