Web Developement
Web Developement
CSS
---CASCADING STYLE SHEET
It is a sheet language that used to handle the presentation of the web page
containing HTML.
It makes are websites beautiful and modern looking.
JS
---JAVASCRIPT
It is a high-level dynamic interpreted programming language.
It allows client-side scripting to create completely dynamic web applications
and websites.
___________________________________________________________________________________
_______________________________________________
HTML
===================================================================================
===============================================
HEADINGS---------------------------------------------------------------------------
---------------------------------------------
<h1>Ritika</h1> //Biggest Heading Tag, should be use only once in a webpage
<h2>Ritika</h2>
<h3>Ritika</h3>
<h4>Ritika</h4>
<h5>Ritika</h5>
<h6>Ritika</h6> //Lowest Heading Tag
<br> //It is a self closing tag used to break the line {HTML ignores extra
space in program)
<b>Bold</b> <i>Italic</i> //also used to BOLD and ITALIC the content (old,
not used)
-----------------------------------------------------------------------------------
----------------------------------------------
LINKS AND
IMAGES-----------------------------------------------------------------------------
------------------------------------
TABLES AND
LISTS------------------------------------------------------------------------------
--------------------------------------------
--LISTS--
--NESTED LIST--
<li>This is second item of my unorderd list</li>
<li>
<ul>
<li>Another one</li>
<li>Another two</li>
<li>Another three</li>
<li>Another four</li>
</ul>
</li>
<li>This is third item of my unorderd list</li>
--TABKLES--
<table>
<thead> //table heading
<tr> //rows
<th>Nmae</th>
<th>Employe ID</th>
<th>Employe Role</th>
</tr>
</thead>
<tbody> //table body
<tr>
<td>Ritika</td> //data
<td>142384</td>
<td>Programmer</td>
</tr>
<tr>
<td>Aman</td> //data
<td>142385</td>
<td>Data Scientist</td>
</tr>
<tr>
<td>Riya</td> //data
<td>142386</td>
<td>xyz</td>
</tr>
</tbody>
</table>
FORMS------------------------------------------------------------------------------
-----------------------------------------
<body>
<h2>This is a Form</h2>
<form action="backend.php">
<label for="name"> Name</label>
<div>
<input type="text" name="myName" id="name">
</div>
<br> //NOT RECOMENDED
<div>
Role: <input type="text" name="myRole">
</div>
<br>
<div>
Email: <input type="email" name="myEmail" id="">
</div>
<br>
<div>
Date: <input type="date" name="myDate">
</div>
<br>
<div>
Bonus: <input type="number" name="myNumber">
</div>
<br>
<div>
Are you eligible: <input type="checkbox"name="myCheckbox"checked>
</div>
<br>
<div>
Gender: MALE<input type="radio"name="myRadio"> FEMALE<input
type="radio"name="myRadio">
OTHER<input type="radio"name="myRadio">
</div>
<br>
<div>
Write about yourself:<br> <textarea name="myText" cols="30"
rows="10"></textarea>
</div>
<br>
<div>
<label for="car"> Car</label>
<select name="myCar" id="car">
<option value="Indica"selected> Indica</option>
<option value="swift"> Swift</option>
</select>
</div>
<br>
<div>
Submit: <input type="submit" value="Submit Now">
Reset: <input type="reset" value="Reset Now">
</div>
</form>
</body>
IDs and
CLASSES----------------------------------------------------------------------------
------------------------------------
ID (Identifier)
ENTITIES---------------------------------------------------------------------------
---------------------------------------------
//Non breaking space (used for extra space)
< > //LOWER and GREATER than (used to write <>) {Eg:- <p>
//<p>}
//MANY MORE available on internet [https://tools.w3cub.com/html-
entities]//
<div class="container">
<p>This is a paragraph</p>
</div>
<div class="container">
<p>This is another paragraph</p> //two space is used
<p>paragraph is written like this <p></p> //<>
<p>pound is written like this £</p> //pound symbol (£)
<p>copyright is written like this ©</p> //copyright symbol (©)
<p>this is written like this ⇛</p> //arrow symbol (⇛)
<p>Empty Character is written like this ​</p> //Empty Character
</div>
SEMANTIC
TAGS-------------------------------------------------------------------------------
---------------------------------
These are some of the roughly 100 semantic elements available:
<article>
<aside>
<details>
<figcaption>
<figure>
<footer>
<form>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
<div>,<span> are non Semantic Elements
<h1>Semantic Elements</h1>
<details>
<summary>I have keys but no doors. I have space but no room. You can
enter but can't leave. What am I?</summary>
A Keyboard
</details>
___________________________________________________________________________________
_______________________________________________
CSS
===================================================================================
===============================================
~CSS gives style to raw HTML
~CSS stands for Cascading Style Sheet
~CSS is used to give style to our web pages
~CSS is used to make websites responsive
~HTML is used to structure a website
~CSS takes responsibility of design
------------------------------------------------------
~INTERNAL CSS;-
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS</title>
<style>
p{
color:rgb(0, 128, 11);
background-color:beige !important;
}
</style>
<link rel="stylesheet" href="ritika.css">
</head>
<body>
<h3>THIS IS CSS</h3>
<!-- <p style="color: red; background-color: yellow;">This will teach you
everything you need to know about HTML/CSS</p> -->
<p>This will teach you everything you need to know about HTML/CSS</p>
</body>
</html>
---------------------------
p{
color: greenyellow
background-color:hotpink;
}
-----------------------------------------------------------------------------------
------------------------------------------------
<title>DEVELEPOR TOOLS</title>
<style>
p{
color: purple;
font-style: italic;
background-color: rosybrown;
}
.bgYellow{
background-color: yellow;
}
</style>
</head>
<body>
<h3 class="bgYellow">Developer Tools</h3>
<p>This is a tutorial for Chrome web developer tools</p>
</body>
-----------------------------------------------------------------------------------
-----------------------------------------
CSS FONTS:-
WEB SAFE FONTS: These are fonts that are pre-installed by many operating systems.
While not all systems have the same fonts installed, you can use a web
safe font stack to chooose
several fonts that look similar, and are installed on the various
systems that you want to support.
If you want to use ones pre-installed, as of CSS3, you can use Web
Fonts
----------------------------
<title>CSS FONTS</title>
<!-- <link rel="preconnect" href="https://fonts.googleapis.com"> -->
<style>
p{
font-family:'Open Sans', sans-serif;
font-size: 33px; /* 1/96th of an inch*/
line-height: 0.3em; /*em is parent font siza ka multiplier*/
font-weight: ;
}
span{
font-weight: bold;
font-style: italic;
}
</style>
</head>
<body>
<h3>Css F onts</h3>
<p>Lets play with <span>FONTS</span>. It is very exciting</p>
</body>
-----------------------------------------------------------------------------------
-----------------------------------------------------
COLORS IN CSS:-
<title>COLORS IN CSS</title>
<style>
/* THREE TYPES TO ADD COLOR */
#firstPara{
color :blueviolet; /*color by name*/
}
#secondPara{
color :#9f2a78; /*color by hex value(not much recommended)*/
}
#thirdPara{
color :rgb(43, 153, 89); /*color by rgb value(recommended)*/
background-color: black;
}
</style>
</head>
<body>
<h2>This is my first box</h2>
<p id="firstPara">This is a paragraph from first box</p>
</body>
-----------------------------------------------------------------------------------
---------------------------------------------------
#secondPara{
background-color: rgb(244, 215, 0);
height: 100px;
width: 455px;
border-top: 4px solid blue;
border-bottom: 4px solid black;
border-left: 4px solid purple;
border-right: 4px solid darkred;
border-top-left-radius: 4px;
border-top-right-radius: 5px;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 25px;
}
#thirdPara{
height: 400px;
width: 455px;
background-image:url('https://source.unsplash.com/random/200x200?
sig=1');
border: 3px solid maroon;
background-repeat: no-repeat;
/* background-repeat: repeat-x;
background-repeat: repeat-y; */
background-position: center center;
/*(bottom left);(12px 15px);(top top);(top center)
(top left);..so on*/
}
</style>
</head>
<body>
<h3>This is heading</h3>
<p id="firstPara">This is a paragraph</p>
BOX MODEL:-
(PADDING & MARGING)
<title>BOX MODEL</title>
<style>
* {
box-sizing: border-box;/*will adjust according to its width*/
margin: 0; /*we can set by default till we override it*/
padding: 0;
}
body{
background-color: rgb(210, 244, 242);
}
.container{
background-color: rgb(161, 239, 230);
border: 3px solid rgb(6, 31, 226);
}
</style>
</head>
<body>
<div class="container">
<h3>This is my heading</h3>
<p id="first">Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Modi rerum odio placeat impedit maxime corrupti distinctio sed ratione nulla eum?
</p>
</div>
<div class="container">
<h3>This is my heading</h3>
<p id="second">Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Modi rerum odio placeat impedit maxime corrupti distinctio sed ratione nulla eum?
</p>
</div>
<div class="container">
<h3>This is my heading</h3>
<p id="third">Lorem ipsum dolor sit amet consectetur, adipisicing elit.
Modi rerum odio placeat impedit maxime corrupti distinctio sed ratione nulla eum?
</p>
</div>
</body>
-----------------------------------------------------------------------------------
---------------------------------------
ALIGNMENT:-
(FLOAT & CLEAR are not much recommended)
<title>ALIGNMENT</title>
<link href="https://fonts.googleapis.com/css2?
family=Open+Sans:ital,wght@1,600&display=swap" rel="stylesheet">
<style>
* {
box-sizing: border-box;
}
body {
font-family: 'Open Sans', sans-serif;
}
.container {
width: 900px;
border: 3px solid black;
margin: auto;
background-color: rgb(188, 236, 92);
}
.item {
border: 2px solid red;
margin: 12px 2px;
padding: 12px 3px;
background: rgb(218, 246, 141);
}
#fruit {
float: left;
width: 48%;
}
#computer {
float: right;
width: 48%;
}
#stationary {
/* float: left; */
width: 100%;
clear: both;
/*clear removes overlapping of float*/
/*both means left and right*/
}
p, h3 {
/* text-align: right;
text-align: left;
text-align: center; (only last command will work) */
text-align: justify;
}
h1 {
margin: auto;
width: 350px;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome To My Store</h1>
<div id="fruit" class="item">
<h3>Fruit</h3>
<p id="fruitpara" class="para">Lorem ipsum dolor sit amet consectetur,
adipisicing elit. Sequi, animi! Non
eaque repellendus vero molestiae dolorem dolorum possimus fugit
facere et earum, eos nostrum illum, quod
nobis, exercitationem qui fuga! Lorem ipsum, dolor sit amet
consectetur adipisicing elit. Aut,
laudantium.</p>
</div>
a{
text-decoration: none;
color: black;
}
a:hover{
color: rgb(246, 10, 10);
background-color:bisque
}
a:visited{
background-color: rgb(116, 252, 12);
}
a:active{
background-color: black;
}
.btn{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
background-color: pink;
padding: 6px;
margin: auto;
border: none;
cursor: pointer;
font-size: 13px;
border-radius: 4px;
}
.btn:hover{
color: blue;
background-color: aqua;
border: 2px solid black;
}
</style>
</head>
<body>
<div class="container" id="cont1">
<h3>This is my heading </h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolorum
velit eveniet voluptatibus illum minus fuga earum deleniti nobis, perferendis
ipsum, eius porro molestiae iure suscipit, id esse repellat repellendus sunt! Id
vitae facere fuga.</p>
<a href="https://facebook.com"class="btn">Read more</a>
<button class="btn">Contact us</button>
</div>
</body>
-----------------------------------------------------------------------------------
-----------------------------------------
NAVIGATION:-
<title>NAVIGATION</title>
<style>
.navbar{
background-color: black;
border-radius: 20px;
}
.navbar ul{
overflow: auto;
}
.navbar li{
float: left;
list-style: none;
margin: 13px 20px;
}
.navbar li a:hover{
color: red;
}
.navbar li a{
padding: 3px 3px;
text-decoration: none;
color: yellow;
}
.search{
float: right;
color: azure;
padding: 7ps 7px;
}
.navbar input{
border: 2px solid black;
border-radius: 4px;
padding: 5px;
width: 190px;
}
</style>
</head>
<body>
<header>
<nav class="navbar">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact Us</a></li>
<div class="search">
<input type="text" name="search" id="search"
placeholder="Search this website">
</div>
</ul>
</nav>
</header>
</body
-----------------------------------------------------------------------------------
----------------------------------------
DISPLAY PROPERTY:-
<title>DISPLAY PROPERTY</title>
<style>
*{
box-sizing: border-box;
}
header{
border: 2px solid black;
margin: auto;
width: 10%;
}
img{
margin: auto;
display: block;
width: 234px;
}
h3{
text-align: center;
font-family: cursive;
margin: 0px;
}
.box{
border: 2px solid blue;
background-color: skyblue;
margin: 4px;
padding: 14px;
display: inline-block;
width: 30%;
box-sizing: border-box;
display: inline-block;
}
.container{
margin: auto;
width: 1200;
}
</style>
</head>
<body>
<header class="top">
<img src="https://th.bing.com/th/id/R.8d1981a"alt="">
<h3>Welcome to Ritika's World</h3>
</header>
<div class="container">
<div class="box">
<h4 class="heading">Heading</h4>
<p>Lorem ipsum dolor </p>
</div>
<div class="box">
<h4 class="heading">Heading</h4>
<p>Lorem ipsum dolor </p>
</div>
<div class="box">
<h4 class="heading">Heading</h4>
<p>Lorem ipsum dolor </p>
</div>
</div>
</body>
-----------------------------------------------------------------------------------
-----------------------------------------------
POSITIONS:-
<title>Position</title>
<style>
.container{
border: 2px solid black;
background-color: tan;
height: 1200px;
}
/*CSS position: static(default) ,absolute ,relative ,fixed ,sticky */
.box{
display: inline-block;
border: 2px solid black;
width: 150px;
height: 150px;
margin: 2px;
}
#box3{
/* position: relative; */
/*relative to its normal position & will leave a gap at its normal position*/
/* absolute:relative to the position to its first parent*/
/* top: 34px;
left: 34px; */
/* sticky: */
position: sticky;
top: 3px;
}
</style>
</head>
<body>
<div class="container">
<div class="box" id="box1">1</div>
<div class="box" id="box2">2</div>
<div class="box" id="box3">Chat with us</div>
<div class="box" id="box4">4</div>
</div>
</body>
-----------------------------------------------------------------------------------
-------------------------------------------