BASIC STRUCTURE
< html >
< head >
< !-- Non-visual part -->
< title>BASIC PAGE< /title >
< /head >
< body >
< !-- Visual part -->
< /body >
< /html >
Syntax
< tagname attributename = "value"> Related text < / tagname>
Syntax of paragraph tag
< p >
What ever the text you need .
< /p >
Here is the list !
< p > This is normal Text style < /p >
< big > This is Big text < /big >
< Small > This is small text < /small >
< i > This is italic text < /i >
< strong > This is strong text < /strong >
< sup > This is superscripted text < /sup >
< sub > This is subscripted text < /sub >
< ins > This is inserted text < /ins >
< del > This is deleted text < /del >
< em > This is emphasis text < /em >
< b > This is bold text < /b >
< !--Heading formats-- >
< h1 > This is h1 text < /h1 >
< h2 > This is h2 text < /h2 >
< h3 > This is h1 text < /h3 >
< h4 > This is h4 text < /h4 >
< h5 > This is h5 text < /h5 >
< h6 > This is h6 text < /h6 >
Basic attribute syntax
attributename = "value";
Basic syntax
< img src="url" alt="description of image" width="xpx" height="ypx" >
Basic syntax
< a href="url" target="_blank" > Text / Image < /a >
Basic syntax
< caption > Table Title < /caption >
< table >
< tr >
< th >Head 1< /th >
.
.
< /tr >
< tr >
< td > data < /td >
.
.
.
< /tr >
.
.
< /table >
S.NO | NAME OF THE STUDENT | ROLL NUMBER | BRANCH-YEAR |
---|---|---|---|
1 | Pettem Srikanth | 17017T0921 | CSE Final YEAR |
2 | Erry Rakesh Reddy | 17017T0907 | CSE Final YEAR |
3 | Chelikani Anil | 17017T0906 | CSE Final YEAR |
4 | Bukya Ram | 17017T1803 | IT Final YEAR |
Basic syntax
< label for="forms">STUDENT DATA< /label>
< form class="student" action="index.html" method="post">
< label for="">Name of the student< /label>
< input type="text" name="" value="" placeholder="Enter Your Name" autofocus required alt="NAME" multiple>
< label for="">Roll NUmber< /label>
< input type="text" name="" value="" placeholder="Enter Your RollNumber" autofocus autocomplete="N/A" required alt="roll">
< label for="">DOB< /label>
< input type="date" name="DATE" value="20/11/200" required autofocus placeholder="Enter Your DOB" autocomplete="N/A">
< label for="">TIME< /label>
< input type="time" name="" value="" required placeholder="TIME">
< label for="">EMAIL< /label>
< input type="email" name="" value="" required placeholder="EMAIL">
< label for="">COLOR< /label>
< input type="color" name="" value="" required placeholder="COLOR">
< label for="">IMAGE UPLOAD< /label>
< input type="image" name="" value="" required placeholder="IMAGE">
< label for="">FILE UPLOAD< /label>
< input type="file" name="" value="" required placeholder="FILE">
< label for="">URL< /label>
< input type="url" name="" value="" required placeholder="URL">
< label for="">I here by declare< /label>
< input type="checkbox" name="" value="" required placeholder="CHECKBOX">
< label for="">RANGE< /label>
< input type="range" name="" value="" required placeholder="RANGE">
< label for="">PASSWORD< /label>
< input type="password" name="" value="" required placeholder="password">
< label for="">LOCAL_TIME< /label>
< input type="datetime-local" name="" value="" required placeholder="LOCALTIME">
< label for="">PROCCED TO SUBMIT< /label>
< input type="submit" name="sub" value="" placeholder="submit">
< /form>
Basic syntax
< b style="color:red;">red< /b>
< b style="color:#f00;">red< /b>
< b style="color:#ff0000;">red< /b>
< b style="color:rgb(f,f,f);">white< /b>
< b style="color:rgba(f,f,f,1);">white< /b>
< b style="color:hsl(0, 100%, 100%);">white< /b>
Basic syntax
< header>
HEAD OF THE SMALL PAGE
< /header>
< nav>
< ul>
< li>
< a href="#home">HOME< /a>
< /li>
< li>
< a href="https://pettemsrikanth.github.io/">About me< /a>
< /li>
< /ul>
< /nav>
< footer>
All ©-2020 copyrights are reserved by WE FOR US
< /footer>
Basic syntax
< article class="article">
< h1>Article head1< /h1>
< section class="section">
< h1>Section head< /h1>
< /section>
< /article>
< article class="article">
< h1>Article head2< /h1>
< aside class="aside">
aside
< /aside>
< /article>
Basic syntax
< audio src="a.mp3" controls preload="" aria-controls="" mediagroup="">
< label for="audio">Just Enjoy The Music .< /label>
< /audio>
< label for="video">Just Chill Out .< /label>
< video src="v.mp4" controls poster="1.jpg" width="45%" height="25%">
< /video>
Basic syntax
< label for="progress">INTELLIGENCE OF PETTEM SRIKANTH < /label>
< progress value="0" max="100">0%< /progress>
Basic syntax
< script type="text/javascript">
var name=prompt("ENTER YOUR NAME ");
localStorage.setItem("key1",name);
alert("Mr."+localStorage.getItem("key1")+" This is localStorage . You we learn more about this in further depth . ");
localStorage.removeItem("key1");
localStorage.clear();
sessionStorage.setItem("key2",name);
alert("Mr. "+sessionStorage.getItem("key2")+" This is sessionStorage . Anyway let's dive the ocean of learning together !");
sessionStorage.removeItem("key2");
sessionStorage.clear();
< /script>
Basic syntax
< p>click the location button< /p>
< button type="button" name="button" onclick="getLocation()" >GET LOCATION< /button>
< p id="demo">< /p>
< script type="text/javascript">
var x=document.getElementById("demo");
function getLocation(){
if (navigator.geolocation){
navigator.geolocation.getCurrentPosition(showPosition);
}
else{
x.innerHTML="Geolocation is not supported in your Brower .";
}
}
function showPosition(position){
x.innerHTML="Latitude: "+position.coords.latitude+"
Longitude: "+position.coords.longitude;
}
< /script>
click the location button
Basic syntax
< script type="text/javascript">
function allowDrop(ev){
ev.preventDefault();
}
function drag(ev){
ev.dataTransfer.setData("text",ev.target.id);
}
function drop(ev){
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
< /script>
< div id="box" ondrop="drop(event)" ondragover="allowDrop(event)" style="border:1px solid white;width:336;height:300;">
< /div>
< br>
< img id="drag1" src="1.jpeg" alt="IMAGE" draggable="true" ondragstart="drag(event)">
< img id="drag2" src="1.jpeg" alt="IMAGE" draggable="true" ondragstart="drag(event)">
Basic syntax :
< img src="image.svg" alt="SVG IMAGE" width="20px" height="10px">
< label for="">CIRCLE< /label>< br>
< svg width="300" height="300">
< circle cx="50" cy="50" r="50" fill="skyblue">
< /svg>
< label for="">RECTANGLE< /label>< br>
< svg width="300" height="300">
< rect x="50" y="50" width="100" height="90" fill="skyblue">
< /svg>
< label for="">LINE< /label>< br>
< svg width="300" height="300">
< line x1="0" y1="0" x2="300" y2="300" style="stroke:skyblue;stroke-linecap:round;stroke-width:">
< /svg>
< label for="">ELLIPSE< /label>< br>
< svg width="300" height="300">
< ellipse cx="100" cy="100" rx="50" ry="70" fill="skyblue">
< /svg>
< label for="">POLYLINE< /label>< br>
< svg width="300" height="300">
< polyline style="stroke-linejoin:miter;stroke:black;stroke-width:12;fill:skyblue;" points="10 10 ,15 150,20 10,100 100">
< /svg>
< label for="">POLYGON< /label>< br>
< svg width="300" height="300">
< polygon points="10 100,200 20,30 300,40 0" style="fill:skyblue;stroke:black;">
< /svg>
Basic syntax
< canvas id="canvas1" width="400" height="400" style="border:1px solid white;">
Your brower doesn't support the canvas tag .
< /canvas>
< script type="text/javascript">
var c = document.getElementById('canvas1');
var ctx = c.getContext("2d");
ctx.fillStyle = "#fff";
ctx.font = "10px monospace";
ctx.fillText("Hello World",10,50);
ctx.fillRect(20,20,10,10);
ctx.fillRect(10,10,10,10);
ctx.rotate((Math.PI/100)*25);
ctx.fillText("after rotate",200,200);
ctx.scale(1.5,4);
ctx.fillText("after scale",150,150);
< /script>