Practice Problems ( Code Fast)
Practice Problems ( Code Fast)
PRACTICE TEST
1.Create an HTML document that includes both an ordered list and an unordered list.
Html….?
<html >
<head> <title>Lists Example</title> </head>
<body>
<h1>My Favorite Fruits</h1>
<h2>Ordered List</h2>
<ol>
<li>Apple</li>
<li>Banana</li>
<li>Cherry</li>
</ol>
<h2>Unordered List</h2>
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ul>
</body>
</html>
2.Create a simple HTML login form that resembles a Facebook login page….?
<html>
<head>
<title>Facebook Login</title>
</head>
<body>
<h1>Facebook</h1>
<form>
<label for="email">Email or Phone:</label><br>
<label for="password">Password:</label><br>
<input type="submit">
</form>
</body>
</html>
3.Create an HTML document that uses internal CSS to style the page….?
<html>
<head>
<style>
h1 {color: #333;}
p {color: #666;}
</style>
</head>
<body>
<h1>Welcome to My Page</h1>
</body>
</html>
4.Create a simple JavaScript object that represents a person and log the properties to the
console….?
let person = {
name: "kohli",
age: 36,
isStudent: false
};
let person1 = {
name: "dhoni",
age:42,
isStudent: false
};
console.log(person1.name); // Output: 30
VIVA QUESTIONS
• <br>
• Using the <ul> tag with <li> items, e.g., <ul><li>Item 1</li></ul>
• <strong> indicates strong importance (semantic), while <b> is just for bold text
(stylistic).
• href
CSS Questions
• Using the <link> tag in the <head>, e.g., <link rel="stylesheet" href="styles.css">
• margin is the space outside an element, while padding is the space inside an
element.
• Using /* comment */