Skip to main content

External Css in HTML


We will create separate css file which will be linked using <link> tag .It is standard approach to create application.
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="header">
<div id="logo">
 <img src="logo.jpg" width="210" height="75" />
</div>
<div id="login">
 <table id="logintable">
  <tr><td >Email or Phone</td><td style="color:white;">Password</td><td></td></tr>
  <tr><td><input type="text" /></td><td><input type="text" /></td><td><input type="button" value="Log in" ></td></tr>
  <tr><td></td><td><a href="" >Forgotten account?</a></td><td></td></tr>
 </table>
</div>
</div>
<div id="middlecontainer">
<div id="middleleft">
<div id="middleleftfirst">
<p >Facebook helps you connect and share with the people in your life</p>
   <img src="bg.png" >
    </div>
</div>
<div id="middleright">
<h1>Create An Account</h1>
<h3>It's quick and easy.</h3>
<table >
<tr><td style="width:32%;"><input class="text1" type="text" placeholder="First name" /></td><td style="width:63%;"><input class="text1" type="text" name="" placeholder="Surname"/></td></tr>
<tr s><td colspan="2"><input class="text2" type="text" placeholder="Mobile number or email address "/></td></tr>
<tr ><td colspan="2"><input class="text2" type="password" placeholder="New Password"  /></td></tr>
<tr><td colspan="2" id="birth">Birthday</td></tr>
<tr ><td colspan="2"><select><option value="">10</option><option value="">Day</option><option value="">1</option><option value="">2</option></select><select><option value="">DEC</option><option value="">MONTH</option><option value="">Jan</option><option value="">Feb</option></select><select><option value="">1994</option><option value="">YEAR</option><option value="">2019</option><option value="">2018</option></select></td></tr>
<tr ><td colspan="2" id="gender">Gender</td></tr>
<tr ><td colspan="2"><input type="radio"   />Female <input type="radio"   />Male <input type="radio"   />Custom</td></tr>
<tr ><td colspan="2"><p>By clicking Sign Up, you agree to our Terms, Data Policy and Cookie Policy. You may receive SMS notifications from us and can opt out at any time.</p></td></tr>
<tr ><td colspan="2"><input  type="button" value="Sign UP"   /></td></tr>
</table>
</div>
</div>
<div id="footer">
</div>
</body>
</html>
CSS FILE:-
#header
{
height:100px;
background-color:#4867AA
}
#logo
{
         float:left;
         width:30%;
         height:75%;
         padding-top:10px;
         padding-left:160px;
}
#login{
float:right;
width:55%;
height:75%;
}
#logintable{

margin-left:100px;
margin-top:25px;
}
        #middlecontainer
        {
        height:650px;
        background-color:#EDF0F5;
        }
         #middleleft
        {
        float:left;
        height:100%;
        width:50%;
        border:1px solid red;
        }
         #middleleftfirst
        {
        margin-top:90px;
        margin-left: 100px;
        }
         #middleright
        {
        float:right;
        height:100%;
        width:49%;
        border:1px solid red;
        }
       #login input[type="button"]{

        background-color:blue;
        color:white;
        font-weight: bolder;
         border:0px ;
        }
       #login td{
         color:white;
        }
        a{
         color:white;
        }
       #middleleftfirst p{
        font-size: 27px;
        font-weight: bolder;
        color:blue;
        }
        #middleright tr{
        height: 50px;
        }
        .text1
        {
        height:35px;
        width:195px;
        border-radius: 3px;
        padding-left: 3px;
        }
        .text2{
        height:25px;
        width:400px;
        border-radius: 6px;
        }
        #birth
        {
        font-size: 22px;
        color: gray;
        font-weight: bolder;
        }
        #gender{
        font-size: 22px;
        color: gray;
        font-weight: bolder;
        }
        #middleright input[type="button"]
        {
        width: 200px;
        height: 35px;
        border-radius: 5px;
        background-color: green;
        }
         #middleright input[type="radio"]{
          color:black;
         }
        #footer{
        height:100px;background-color:#FFFFFF
        }

Comments

Popular posts from this blog

DSA in C# | Data Structure and Algorithm using C#

  DSA in C# |  Data Structure and Algorithm using C#: Lecture 1: Introduction to Data Structures and Algorithms (1 Hour) 1.1 What are Data Structures? Data Structures are ways to store and organize data so it can be used efficiently. Think of data structures as containers that hold data in a specific format. Types of Data Structures: Primitive Data Structures : These are basic structures built into the language. Example: int , float , char , bool in C#. Example : csharp int age = 25;  // 'age' stores an integer value. bool isStudent = true;  // 'isStudent' stores a boolean value. Non-Primitive Data Structures : These are more complex and are built using primitive types. They are divided into: Linear : Arrays, Lists, Queues, Stacks (data is arranged in a sequence). Non-Linear : Trees, Graphs (data is connected in more complex ways). Example : // Array is a simple linear data structure int[] number...

Conditional Statement in Python

It is used to solve condition-based problems using if and else block-level statement. it provides a separate block for  if statement, else statement, and elif statement . elif statement is similar to elseif statement of C, C++ and Java languages. Type of Conditional Statement:- 1) Simple if:- We can write a single if statement also in python, it will execute when the condition is true. for example, One real-world problem is here?? we want to display the salary of employees when the salary will be above 10000 otherwise not displayed. Syntax:- if(condition):    statements The solution to the above problem sal = int(input("Enter salary")) if sal>10000:     print("Salary is "+str(sal)) Q)  WAP to increase the salary of employees from 500 if entered salary will be less than 10000 otherwise the same salaries will be displayed. Solution:- x = int(input("enter salary")) if x<10000:     x=x+500 print(x)   Q) WAP to display th...

Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025

 Top 50 Most Asked MERN Stack Interview Questions and Answers for 2025 Now a days most of the IT Company asked NODE JS Question mostly in interview. I am creating this article to provide help to all MERN Stack developer , who is in doubt that which type of question can be asked in MERN Stack  then they can learn from this article. I am Shiva Gautam,  I have 15 Years of experience in Multiple IT Technology, I am Founder of Shiva Concept Solution Best Programming Institute with 100% Job placement guarantee. for more information visit  Shiva Concept Solution 1. What is the MERN Stack? Answer : MERN Stack is a full-stack JavaScript framework using MongoDB (database), Express.js (backend framework), React (frontend library), and Node.js (server runtime). It’s popular for building fast, scalable web apps with one language—JavaScript. 2. What is MongoDB, and why use it in MERN? Answer : MongoDB is a NoSQL database that stores data in flexible, JSON-like documents. It...