Web-Development class Test Question's answer with source code

Web-Development simple questions' answers with code


Q1. Write HTML code to display welcome to exam hall having font size 36 font color as green in using CSS ?

Ans:- 

1.HTML CODE:-

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Font 36 using CSS</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <H1>WELCOME to Exam Hall</H1>
</body>
</html>

2. CSS:- style.css

*{
    margin0;
    padding0;
}
h1{
    font-size36px;
    text-aligncenter;
    colorgreen;
}

Result :-

font size 36 and font color green in css source code

Q2. Write CSS code to display all links of documents without Underline ?

Ans:-

1. HTML:- index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Font 36 using CSS</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <nav>
        <h1>Using CSS</h1>
        <ul>
            <li><a href="">HOME</a> </li>
            <li><a href="">SERVICE</a> </li>
            <li><a href="">BLOG</a> </li>
            <li><a href="">ABOUT US</a> </li>
        </ul>
    </nav>
    <br>
    <h2>After Implementation</h2>
    <br>
    <nav>
        <h1>Removing Underling using CSS</h1>
        <ul class="navbar">
            <li><a href="">HOME</a> </li>
            <li><a href="">SERVICE</a> </li>
            <li><a href="">BLOG</a> </li>
            <li><a href="">ABOUT US</a> </li>
        </ul>
    </nav>
</body>
</html>

2. CSS:-  style.css

*{
    margin0;
    padding0;
}
h1{
    font-size36px;
    text-aligncenter;
    colorgreen;
}
h2{
    text-aligncenter;
}
nav{
    width100%;
    background-color#ecaaaa;
}
nav ul li{
    text-aligncenter;
}
nav .navbar{
    displayflex;
    justify-contentcenter;
}
nav .navbar li{
    list-stylenone;
    padding-left10px;
}
nav .navbar li a{
    text-decorationnone;
    colorblack;
    font-weight500;
    border1px solid black;
}

Result:-

menu underline remove using css in html

Q3. Write a HTML code to display current month using table tag

Ans:-

1.HTML:- index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text Font 36 using CSS</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <h1>Get Month Calendar in HTML CODE</h1>
    <table border="1" cellspacing="0" align="center" cellpadding="0">
        <tr>
            <td>
                <label for="date" class="mx-1">Month</label>
            </td>
            <td><input type="date" class="mx-1"></td>
        </tr>
    </table>
</body>
</html>

2.CSS:- style.css

*{
    margin0;
    padding0;
}
h1{
    font-size36px;
    text-aligncenter;
    colorgreen;
}
table{
    margin0 auto;
}
.mx-1{
    padding9px;
}

Result:-

how to embedded date month calendar in html code web-development

If any doubt then feel free to comment regarding Web-development.

Post a Comment

0 Comments