HTML Notes
HTML Notes
WEB DEVELOPMENT
HTML
ROOBA AHMAD
Starting date
There are 6 headings used in HTML as h1, h2, h3, h4, h5, h6.
What is tag?
Anything that is enclosed in < > is called tag. They are used to show data
on the page. There are two types of tags:
What is attributes?
Attributes provide additional information related to the tag.
What is Editor?
Software where we can write a piece of code to execute is called editor.
We can use sublime text for the editing. Sublime text contains different
languages like c++, PHP, java, JavaScript, etc.
Xamp is use to compile PHP language. Without this we can compile CSS,
JavaScript, html etc.
Important tags:
Tags Uses
<i> Use to make word in italic
<sup> To superscripted the word
<b> Use to bold a word sentence or paragraph.
<mark> To highlight a word
<del> To remove or delete text.
<u> To underline text
<sub> To subscript a word
<br> Use to break line
<img src="" alt=""> alt* agr pic na show ho to iska likha a jata hai
How to write?
<ul type=”circle”></ul>
Agr Kisi cheez ko zyada bar likhna ho to li*5 and press tab
Font:
TABLE
Tags of table:
Attributes:
Border: use for thickness in px
What is lorem?
FORMS
Why we use forms?
Forms are us to extract data from user or client. We use input tag to enter
data.
Use:
<input type=" " name=" " value=" " id=" " placeholder=" "
autofocus=" " required=" " class="" disabled>
Type of data
☺ Text
☺ Number
☺ Radio
☺ Submit
☺ Password
☺ Date
☺ Checkbox
☺ File
☺ Multiple[] use to select multiple files
☺ Range
☺ Hidden used for hidden text
Attributes Use
Name must unique related to input field
Checked add check for automatically like for any 1 gender
Class editing in Css
Id Must unique relate to input field use in js.
Value to show anything like enter name better to use in future
placeholder use placeholder instead of value
autofocus directly cursor ko focus krwata hai
Required must enter data
Title cursor k sath ata hai
Min minimum no k liye
Max maximum no k liye
Download Use to download file or picture.
disabled title To disable a button or anything
Value Use to enter value automatically
Use it with Css external file or can also use it with style tag in html file. Use
for editing.
Brackets []:
It is a SW that helps to show editing on the right side of the sublime. But
sublime is the best option. Brackets are just to understand the working.
Block:
If two different lines are written in different lines but after on screen it will
show only one line. But inline and inline-block write on different lines. Block
pori line py border deta hai.
Background:
Body {background: URL (*); background-size: cover ;}
For small pictures we use no repeat after name of the pic at the place of
cover we can use:
(100vw, 100vh)
Styles Uses
Margin margin is used for the margin outside the thing
Padding padding is use for inside the image
Meta: Meta browser ko understand krany mn help krta hai use it when site
should be responsive or to show data on mobile screen or on different
screens.
4) info 5) warning
Buttons: Agr kisi anchor mn class k sath btn lgaya jay to button ki trha
show krta hai but uska background color ni deta btn-primary or primary ki
jgha py koi or color name likhny sy us color ka background a jay ga. btn-lg
lgany sy button large hota hai or block sy pori line py a jay ga.
Table:
<table class="table table-bordered table-hover"> helps to show
stylish
<div class="container-fluid">
<div class="navbar-header">
To show-: this line three times using anchor we can show buttons.
</button>
Glyph icons: jo choti pic lgi hoti hai home ya YouTube wghera py lgi hoti
hain wo glyph icons khlati hain founded from font awesome site.
<div class="col-lg-4 col-md-6" > lg, xl, md, fm, xxl for devices
4 or 6 ki jagha py koi bhi number likh skty hain depend on your choice
between 1 to 12.it have 6 devices:
1) Lg 2)xlg 3)md
4) fm 5) xxl 6) xl
JavaScript
Introduction: data type->Var
Extension is (.js).it is like cpp. Netscape is a company who invented
JavaScript in 1991.firstly it is considered as small language.it started to use
mostly in 1997 and onwards. Netscape navigator (is a browser) used in
previous years before 2000. JavaScript was made to speed up Netscape
navigator. In 2012 it started to use as a scripting language. and now 2015
to onwards Google buys JavaScript. JS is known as event driven language.
Frame works:
It has different frame works.
3) angular js 4) node.js
Uses:
☺ Integrates the rules of cpp into our webpages.
☺ To make webpages dynamic and interactive.
☺ To resolve html bugs.
Basics of input:
By form:
By prompt:
Functions:
Functions are same as cpp.in cpp we write void but in js we use function
keyword before the function name.
Array:
method: Var x= []; or may be any type of data
Indexing:
[2, 3, 4, 5, 6]
Is mn array khali bhi bna I jaskti hai or indexing bhi kijaskti hai ya data bhi
diya jaskta hai.is mn locations bhi bnti hain jo k 0 sy start hoti hain q k array
ka index 0 sy start hota hai. x.length is use for all to show total no of
indexes in array.
Examples of array:
Example 1:
2d arrays:
var data = ["rehan"," Feisal”, Umar", ["Sami", "Nouman",
"Ahsan"] [true, false, 0.12]];
Example 2:
Data locations:
Var data = ["rehan"," Feisal”, Umar"];
Var data [3] = "Asad"; it will add Asad on the 4th index in array
Push method:
This method is use to add any element in array after the last one. Even we
don’t need to remember the locations to enter new element.
Example:
console.log (data);
Pop method:
This method is used to remove the last element from array. It returns
another copy of the removed element.
Example:
data.pop ();
console.log (data);
TEST:
var data = ["rehan"," Feisal", "Umar", "Sami", "Nouman"];
console.log (data[i]);
Output:
Sami
Feisal
Umar
Splice method:
var data = ["rehan"," Feisal", "Umar", "Sami", "Nouman"];
data. Splice (1, 2); 1st value is location and 2nd no of element splice
Output:
Output:
test
Question 1:
Var x = [2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log(y);
output:
[2, 6]
Question 2:
console.log(x);
Output: