Font size
WorksheetsHTML_CSS_Basics
Total questions: 15
Worksheet time: 5mins
Which tags don't need to be closed?
h1,p
head,body
br, img
html, a
Which of the following are valid HTML tags used to create lists? (Select all that apply)
<ul>
<ol>
<li>
<list>
<tr>
What is the main purpose of HTML attributes?
To add styling to HTML elements
To define the structure of the webpage
To insert JavaScript functions directly into the tag
To add special commands or additional information that extend a tag’s behavior
What is the purpose of the following HTML tag?
<meta charset="utf-8">
It sets the default font for the webpage to UTF-8.
It defines the page's language as UTF-8.
It tells the browser to use UTF-8 character encoding, which supports most characters from all languages.
It links an external stylesheet for UTF-8 compatibility.
Which of the following statements about ordered (<ol>) and unordered (<ul>) lists are true?
(Select all that apply)
<ol> displays list items with numbers by default
You cannot style list bullets or numbers using CSS
Both <ol> and <ul> must contain <li> elements inside
<ul> displays list items with bullet points by default
By default, images are displayed at their (a) size.
Which tags is necessary create table rows?
table
tr
td
th
What is the purpose of the following HTML tag?
<link rel="stylesheet" href="fileName.css">
It links an external CSS file to the HTML document
It embeds CSS styles directly inside the HTML file
It connects a JavaScript file to the HTML document
It creates a hyperlink to another webpage
Which of the following are correct ways to set text color in CSS?
Using an RGB value like color: rgb(255, 236, 114);
Using a hexadecimal value like color: #ff0000;
Using a percentage value like color: 100%;
Using parentheses after a color name like color(red);
What is the correct HTML element for inserting a line break?
<br>
<break>
<ul>
<lb>
What is the correct HTML for adding a background color?
<background>yellow</background>
<body style="background-color:yellow;">
<body bg="yellow">
<color background="blue">
Which HTML attribute is used to define inline styles?
stules
class
style
fond
Which is the correct CSS syntax?
{body;color:black;}
{body=color:black;}
body;color:black;
body{color:black;}
How do you insert a comment in a CSS file?
Which of the below is the correct syntax to put a line over text in CSS?
text-decoration: line
text-decoration: overline
text-decoration: underline
text-decoration: none
