SlideShare uma empresa Scribd logo
1 de 112
HTML, CSS, and JavaScript
for Web Developers!
• GitHub is a website and cloud-based service that helps developers
store and manage their code, as well as track and control changes to
their code. To understand exactly what GitHub is, you need to know
two connected principles:
• Version control
• Git
Creating repos on github
• Login
• Click on the + sign
• Create repos (folder)
• Name it coursera-test
• After this make this repo to host website freely
• Go to setting  pages  git hub pages will be opened  change branch to main
save
• Note that now you should be able to go to
http://yourgihubid.github.io/repository-name/ (replace 'yourgithubid' with your
unique GitHub ID or name
• To get yourgit hub id : https://api.github.com/users/your_github_user_name
Hosting a static websites on github
• Create A Github Repository
• Once the repository is created, we will go ahead and clone the repository
to our computer. For this tutorial, I will be doing so using the Git CLI.
• To clone the repository, I copy the repository URL from new repository
page on Github and then I run the following [go to the place where you
want to clone using cd command]
git clone https://github.com/werkineh/Coursera-test-
.git
• Once the repository is cloned, I change my current directory to the
repository directory
cd Coursera-test-
Hosting a static websites on github …
• Create index.html page in local git repository
• git status command tells as that there is untracked file and ready to be
commited
• git add . Will mark for commiting all files and folder under current directory
• If you see the status now the file ready to be commited will be green
• To commit input git commit –m “My first page” (M for message )
• After this put the file to remote git hub repository from local machine using
git push command
• Every time there is an update following the above steps starting from git
add . .
Browser sync
• Makes your web dev’t faster and save you from repetitive manual tasks
such as
• live reloading in browsers when the code was changed, Change HTML, CSS & JS;
automatically inject those new files without a page refresh
• Mirror action when testing across all browsers and device
• Simulate slower connection for testing
• Install BrowserSync
• BrowserSync is an npm package, as such it needs Node.js installed. To install
BrowserSync globally.
npm install -g browser-sync
• Then open cmd in your web directory that your browsing to start watching for file
change then type:
browser-sync start –server –directories –files “*”
Browser sync…
3. Start Browsersync
• A basic use is to watch all CSS files in the css directory and update connected
browsers if a change occurs. Navigate your terminal window to a project and run the
appropriate command:
• Static sites
• If you’re only using .html files, you’ll need to use the server mode. Browsersync will
start a mini-server and provide a URL to view your site.
• browser-sync start --server --files "css/*.css"
• Dynamic sites
• If you’re already running a local server with PHP or similar, you’ll need to use the
proxy mode. Browsersync will wrap your vhost with a proxy URL to view your site.
• browser-sync start --proxy "myproject.dev" --files
"css/*.css"
Browser sync
• It will open up a chrome browser then when ever you make a change
to one of the file, the change automatically synced
Using vs code editor for cloning git repository
and browser sync
• It is easy to use git hub with vs code
1. Open the command palette with the key combination of Ctrl + Shift + P. or in help
startup page clone github repository
2. At the command palette prompt, enter gitcl, select the Git: Clone command, and press
Enter.
3. gitcl command in the Visual Studio Code command palette prompt
4. When prompted for the Repository URL, select clone from GitHub, then press Enter.
5. If you are asked to sign into GitHub, complete the sign-in process.
6. Enter your repository url in the Repository URL field.
7. Select (or create) the local directory into which you want to clone the project.
8. When you receive the notification asking if you want to open the cloned repository,
select Open.
Using vs code editor for cloning git repository
and browser sync…
• Once you have made a change,
• Click on vs code source control from the left, click on
addcommitgive commentpush the change by clicking sync
changes you can check it on your github repository
Resources
• Stackoverflow.com for any help such code, for asking questions
• https://jsfiddle.net/--> for writing, running, sharing, html code online
• Codepen.io many solutuion as well as just like jsfiddle.net, for
asking questions
• Css-tricks.comdifferent tutorials, answers etc…
HTML
History: HTML
Browser war
• W3c stardard site
• Caniuse.com tells you which html standard or code, which js, etc is
supported by which browser ?
• Validator.w3.org/ to check the code is valid or not to work on
browsers
• www.w3schools.com/browser/browsers_stats.asp--> to see which
browser are more popular
Lecture 3: Anatomy of an HTML Tag
How to specify tags without any content
Basic HTML Document Structure
HTML Content Model
7 html5 content models
HTML Semantic
HTML Heading
• <body>
• <h1>This is the Main Heading</h1>
• <h2>Subheading 2</h2>
• <h3>Subheading 3</h3>
• <h4>Subheading 4</h4>
• <h5>Subheading 5</h5>
• <h6>Subheading 6</h6>
• </body>
lists
HTML Character Entity References
• &nbsp;none breaking space, used when we need a part of
sentence or phrase stay in a line together with out breaking in to two
line when at the end of the screen.
• The misuse of &nbsp; is to give space b/n words which is compelety
wrong usage.
Link to same page
When we use # in href attribute value of a tag, it points to a section of
the document. The section of a page can be identified using
1.Any tag with id attribute with that section name e.g <section
id=“section1”> or
2.a tag with name attribute of that section name e.g <a name
=“section”>
Application: SPA(single page application )
Displaying Images
• Always specify the width and the height of the image to be displayed
whenever possible, so that the browser will allocated width and
height for the image in the page.
• With out specifying the width and the height, it will break the layout
of the page
Module 2: Introduction to CSS3
• HTML: Content, structure
• CSS: Presentation
• NB: csszengarden.com takes a web page and redesign css part of the
page with out affecting html content
• They providing styling
Browser default style
• For example: h1 has a default style of
• Size: high
• Bold style
• Etc
CSS selector
CSS selector
Pseudo-Class Selectors
Quiz
Style conflict resolution: which CSS rules
wins?
Same element with different
property specified in different
style definition
Inheritance
Relative font size
Box model
box-sizing: border-box; property is css3 property that can’t be inherited
from body. For example if all element should follow border-box box-
sizing property, and if we put it under body in our css, it doesn’t work,
can’t inherited to the child of body. Therefore, we will use * selector for
it.
body{box-sizing:border-box;} it can’t be inherited for all element
instead,
*{
box-sizing:border-box;
}
Margin
All element by default has margin top propery by browser default, i.e the first element we put on the browser will not
flush at the top, to make it like that, override it using *{margin:0; padding:0;}, but with body it doesn’t work just like b4.
Positioning element by floating
• In its simplest use, the float property can be used to wrap text around images.
• When we float an element the browser takes them out of regular document flow,
• Element before float element willnot be affected
• Element after float element will be affected and flows around it (if it text, if it is
block level element it will take floated element previous place unless clear is
defined)
• When we use the float property, and we want the next element below (not on
right or left), we will have to use the clear property.
• The clear property specifies what should happen with the element that is next to
a floating element.
• Clear always forces to new line
Positioning element by floating
Floating the first element to the right makes
• the other element to move up b/c float disrupt the regular
document flow
• The container height decreases
Floating the all element to the left makes
• The container shorter
• The element after the floated element
(here: the text) to rap around.
Float: none, normal flow
To continue the normal flow
• the element after the float should have
a style clear float
• Here in these case clear:leftremove all
element floating left of the element and
begin new line
It is possible also to clear floating for box # 3
• box#3{clear:left}nothing is allowed to
float left of box#3, box#3 moved to new
line
Positioning element by floating , clear:both
Floating the first element to the left and 2nd element to the right
makes
• the other two element to move up
To fix this issue, on element 3 we define
clear, but clear:right or clear:left ? b/c there
element float left and floating right for
element 3. if we do clear:right or left it is the
same and looks like the ff,
Float: none, normal flow
The element 3 should come after this, but
since we clear only from the left, it doesn’t
Case:2 clear:right
But when we increase the height of left
floated element(elem 1), it will be
overlapping b/c we only clear from right only
Case 1:clear: left
• But when increase the height of right
floated element, it is still floating
element 3, shown
Solution case: clear: both
But when we increase the height of left
floated element(elem 1), it will be
overlapping b/c we only clear from right only
3rd elem come after right
floated element only, not
element 1
3rd elem come after both
right floated element left
floated element
Relative and Absolute Element positioning
An element with position: static; is not positioned in any
special way; it is always positioned according to the normal
flow of the page: First come first placed according to html code
order
Relative and Absolute Element positioning
Container
should be
relative or
absolute
Media Queries
• Using css it is possible to produce different webpage layout from
same html, for desktop, for phones etc….
Media Queries
Common operator is and operator
[768, 991]
Media Queries
Common to all screen, and displayed
when all media queries specified is
false
Specific screen size
Responsive Design
<meta name=“viewport” content=“width=device-width, initial-scale=1”>
• By default, when browsers display a web page on mobile phones, or
smaller screen, it tries to zoom in or shirks it self so that as much as
possible every content is shown.
• But latter, css updates itself so that different screen sizes can be considered
during development,
• Therefore, to tell the browser not to zoom in specify viewport metatag
• In short it is used to Tells the browser to consider the width of the
device as the real width of the screen and set its zoom level to
1, i.e., 100%, so it's not zoomed in or zoomed out.
• width=device-width don’t shrink, just use device width as it is
• Intial-scale=1no zoom in or out-no SCALING
Twitter Bootstrap
• Essentially, Bootstrap saves you from writing lots of CSS code, giving you more time to spend on
designing webpages.
• It’s also FREE! It’s currently hosted on GitHub and can be downloaded easily from the official site.
How to use bootstrap?
• Two ways;
1. Download and include it in your project folder, and then link it to your code in
head section for css and in body section for js
2. Using cdn
Include the following CSS file into the <head> tag of your HTML:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous">
Afterward include jQuery, Popper.js, and Bootstrap’s Javascript file before the end of your <body> tag:
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-
DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-
9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-
B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu
HTML, CSS, and Javascript for Web developed by hu

Mais conteúdo relacionado

Semelhante a HTML, CSS, and Javascript for Web developed by hu

Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Thinkful
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developersDmitry Guyvoronsky
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02Gourav Varma
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your codeOsama Mustafa
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven developmentGil Fink
 
Git Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptxGit Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptxDevOps University
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't CodeChristopher Schmitt
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jiralenamattt
 
Bitbucket Devops PPT.pptx
Bitbucket Devops PPT.pptxBitbucket Devops PPT.pptx
Bitbucket Devops PPT.pptxXIE2020Students
 
3DC Intro to Git Workshop
3DC Intro to Git Workshop3DC Intro to Git Workshop
3DC Intro to Git WorkshopBeckhamWee
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 

Semelhante a HTML, CSS, and Javascript for Web developed by hu (20)

Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git and git hub basics
Git and git hub basicsGit and git hub basics
Git and git hub basics
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
First app
First appFirst app
First app
 
16 Git
16 Git16 Git
16 Git
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
Git Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptxGit Tutorials Git vs GitHub.pptx
Git Tutorials Git vs GitHub.pptx
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code[artifactconf] Github for People Who Don't Code
[artifactconf] Github for People Who Don't Code
 
Bitbucket git-bamboo-jira
Bitbucket git-bamboo-jiraBitbucket git-bamboo-jira
Bitbucket git-bamboo-jira
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Bitbucket Devops PPT.pptx
Bitbucket Devops PPT.pptxBitbucket Devops PPT.pptx
Bitbucket Devops PPT.pptx
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
3DC Intro to Git Workshop
3DC Intro to Git Workshop3DC Intro to Git Workshop
3DC Intro to Git Workshop
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 

Último

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Último (20)

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 

HTML, CSS, and Javascript for Web developed by hu

  • 1. HTML, CSS, and JavaScript for Web Developers!
  • 2.
  • 3. • GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code. To understand exactly what GitHub is, you need to know two connected principles: • Version control • Git
  • 4. Creating repos on github • Login • Click on the + sign • Create repos (folder) • Name it coursera-test • After this make this repo to host website freely • Go to setting  pages  git hub pages will be opened  change branch to main save • Note that now you should be able to go to http://yourgihubid.github.io/repository-name/ (replace 'yourgithubid' with your unique GitHub ID or name • To get yourgit hub id : https://api.github.com/users/your_github_user_name
  • 5. Hosting a static websites on github • Create A Github Repository • Once the repository is created, we will go ahead and clone the repository to our computer. For this tutorial, I will be doing so using the Git CLI. • To clone the repository, I copy the repository URL from new repository page on Github and then I run the following [go to the place where you want to clone using cd command] git clone https://github.com/werkineh/Coursera-test- .git • Once the repository is cloned, I change my current directory to the repository directory cd Coursera-test-
  • 6. Hosting a static websites on github … • Create index.html page in local git repository • git status command tells as that there is untracked file and ready to be commited • git add . Will mark for commiting all files and folder under current directory • If you see the status now the file ready to be commited will be green • To commit input git commit –m “My first page” (M for message ) • After this put the file to remote git hub repository from local machine using git push command • Every time there is an update following the above steps starting from git add . .
  • 7. Browser sync • Makes your web dev’t faster and save you from repetitive manual tasks such as • live reloading in browsers when the code was changed, Change HTML, CSS & JS; automatically inject those new files without a page refresh • Mirror action when testing across all browsers and device • Simulate slower connection for testing • Install BrowserSync • BrowserSync is an npm package, as such it needs Node.js installed. To install BrowserSync globally. npm install -g browser-sync • Then open cmd in your web directory that your browsing to start watching for file change then type: browser-sync start –server –directories –files “*”
  • 8. Browser sync… 3. Start Browsersync • A basic use is to watch all CSS files in the css directory and update connected browsers if a change occurs. Navigate your terminal window to a project and run the appropriate command: • Static sites • If you’re only using .html files, you’ll need to use the server mode. Browsersync will start a mini-server and provide a URL to view your site. • browser-sync start --server --files "css/*.css" • Dynamic sites • If you’re already running a local server with PHP or similar, you’ll need to use the proxy mode. Browsersync will wrap your vhost with a proxy URL to view your site. • browser-sync start --proxy "myproject.dev" --files "css/*.css"
  • 9. Browser sync • It will open up a chrome browser then when ever you make a change to one of the file, the change automatically synced
  • 10. Using vs code editor for cloning git repository and browser sync • It is easy to use git hub with vs code 1. Open the command palette with the key combination of Ctrl + Shift + P. or in help startup page clone github repository 2. At the command palette prompt, enter gitcl, select the Git: Clone command, and press Enter. 3. gitcl command in the Visual Studio Code command palette prompt 4. When prompted for the Repository URL, select clone from GitHub, then press Enter. 5. If you are asked to sign into GitHub, complete the sign-in process. 6. Enter your repository url in the Repository URL field. 7. Select (or create) the local directory into which you want to clone the project. 8. When you receive the notification asking if you want to open the cloned repository, select Open.
  • 11. Using vs code editor for cloning git repository and browser sync… • Once you have made a change, • Click on vs code source control from the left, click on addcommitgive commentpush the change by clicking sync changes you can check it on your github repository
  • 12. Resources • Stackoverflow.com for any help such code, for asking questions • https://jsfiddle.net/--> for writing, running, sharing, html code online • Codepen.io many solutuion as well as just like jsfiddle.net, for asking questions • Css-tricks.comdifferent tutorials, answers etc…
  • 13. HTML
  • 14.
  • 15.
  • 16.
  • 18. Browser war • W3c stardard site • Caniuse.com tells you which html standard or code, which js, etc is supported by which browser ? • Validator.w3.org/ to check the code is valid or not to work on browsers • www.w3schools.com/browser/browsers_stats.asp--> to see which browser are more popular
  • 19.
  • 20. Lecture 3: Anatomy of an HTML Tag
  • 21.
  • 22. How to specify tags without any content
  • 23.
  • 24. Basic HTML Document Structure
  • 25.
  • 27. 7 html5 content models
  • 29. HTML Heading • <body> • <h1>This is the Main Heading</h1> • <h2>Subheading 2</h2> • <h3>Subheading 3</h3> • <h4>Subheading 4</h4> • <h5>Subheading 5</h5> • <h6>Subheading 6</h6> • </body>
  • 30.
  • 31. lists
  • 32. HTML Character Entity References
  • 33. • &nbsp;none breaking space, used when we need a part of sentence or phrase stay in a line together with out breaking in to two line when at the end of the screen. • The misuse of &nbsp; is to give space b/n words which is compelety wrong usage.
  • 34.
  • 35. Link to same page When we use # in href attribute value of a tag, it points to a section of the document. The section of a page can be identified using 1.Any tag with id attribute with that section name e.g <section id=“section1”> or 2.a tag with name attribute of that section name e.g <a name =“section”> Application: SPA(single page application )
  • 36. Displaying Images • Always specify the width and the height of the image to be displayed whenever possible, so that the browser will allocated width and height for the image in the page. • With out specifying the width and the height, it will break the layout of the page
  • 37. Module 2: Introduction to CSS3 • HTML: Content, structure • CSS: Presentation • NB: csszengarden.com takes a web page and redesign css part of the page with out affecting html content • They providing styling
  • 38.
  • 39. Browser default style • For example: h1 has a default style of • Size: high • Bold style • Etc
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 49. Quiz
  • 50. Style conflict resolution: which CSS rules wins? Same element with different property specified in different style definition
  • 52.
  • 54. Box model box-sizing: border-box; property is css3 property that can’t be inherited from body. For example if all element should follow border-box box- sizing property, and if we put it under body in our css, it doesn’t work, can’t inherited to the child of body. Therefore, we will use * selector for it. body{box-sizing:border-box;} it can’t be inherited for all element instead, *{ box-sizing:border-box; }
  • 55. Margin All element by default has margin top propery by browser default, i.e the first element we put on the browser will not flush at the top, to make it like that, override it using *{margin:0; padding:0;}, but with body it doesn’t work just like b4.
  • 56.
  • 57. Positioning element by floating • In its simplest use, the float property can be used to wrap text around images. • When we float an element the browser takes them out of regular document flow, • Element before float element willnot be affected • Element after float element will be affected and flows around it (if it text, if it is block level element it will take floated element previous place unless clear is defined) • When we use the float property, and we want the next element below (not on right or left), we will have to use the clear property. • The clear property specifies what should happen with the element that is next to a floating element. • Clear always forces to new line
  • 58. Positioning element by floating Floating the first element to the right makes • the other element to move up b/c float disrupt the regular document flow • The container height decreases Floating the all element to the left makes • The container shorter • The element after the floated element (here: the text) to rap around. Float: none, normal flow To continue the normal flow • the element after the float should have a style clear float • Here in these case clear:leftremove all element floating left of the element and begin new line It is possible also to clear floating for box # 3 • box#3{clear:left}nothing is allowed to float left of box#3, box#3 moved to new line
  • 59. Positioning element by floating , clear:both Floating the first element to the left and 2nd element to the right makes • the other two element to move up To fix this issue, on element 3 we define clear, but clear:right or clear:left ? b/c there element float left and floating right for element 3. if we do clear:right or left it is the same and looks like the ff, Float: none, normal flow The element 3 should come after this, but since we clear only from the left, it doesn’t Case:2 clear:right But when we increase the height of left floated element(elem 1), it will be overlapping b/c we only clear from right only Case 1:clear: left • But when increase the height of right floated element, it is still floating element 3, shown Solution case: clear: both But when we increase the height of left floated element(elem 1), it will be overlapping b/c we only clear from right only 3rd elem come after right floated element only, not element 1 3rd elem come after both right floated element left floated element
  • 60.
  • 61. Relative and Absolute Element positioning An element with position: static; is not positioned in any special way; it is always positioned according to the normal flow of the page: First come first placed according to html code order
  • 62. Relative and Absolute Element positioning Container should be relative or absolute
  • 63.
  • 64. Media Queries • Using css it is possible to produce different webpage layout from same html, for desktop, for phones etc….
  • 65. Media Queries Common operator is and operator [768, 991]
  • 66. Media Queries Common to all screen, and displayed when all media queries specified is false Specific screen size
  • 67.
  • 69.
  • 70.
  • 71.
  • 72. <meta name=“viewport” content=“width=device-width, initial-scale=1”> • By default, when browsers display a web page on mobile phones, or smaller screen, it tries to zoom in or shirks it self so that as much as possible every content is shown. • But latter, css updates itself so that different screen sizes can be considered during development, • Therefore, to tell the browser not to zoom in specify viewport metatag • In short it is used to Tells the browser to consider the width of the device as the real width of the screen and set its zoom level to 1, i.e., 100%, so it's not zoomed in or zoomed out. • width=device-width don’t shrink, just use device width as it is • Intial-scale=1no zoom in or out-no SCALING
  • 73.
  • 74. Twitter Bootstrap • Essentially, Bootstrap saves you from writing lots of CSS code, giving you more time to spend on designing webpages. • It’s also FREE! It’s currently hosted on GitHub and can be downloaded easily from the official site.
  • 75.
  • 76. How to use bootstrap? • Two ways; 1. Download and include it in your project folder, and then link it to your code in head section for css and in body section for js 2. Using cdn Include the following CSS file into the <head> tag of your HTML: <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> Afterward include jQuery, Popper.js, and Bootstrap’s Javascript file before the end of your <body> tag: <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384- DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384- 9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384- B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>

Notas do Editor

  1. How to get repository url: go to reposistory  click on green button “Code” button
  2. Marks the text “why I love this course” as a title Language: there is its own syntax and semantics
  3. In html 5 it forbidden to put <p/> even it doesn't have a content
  4. B4 html 5 elements is categorized into two, block level element and inline element, but html5 make the catagories 7 (refer: https://www.w3.org/TR/2011/WD-html5-20110525/content-models.html) Block and inline are not part of html5, but still used as flow and frase
  5. Semantic  meaning in language or logic
  6. even though their default rendering in the browser appears to give them visual distinction, these should not be used for styling. These elements are only meant to convey structure of your HTML page, nothing more. Why I don’t use div using css to make it similar with h1—h6, b/c it looses it’s semantics, search engines looks h1 element when it search not div
  7. The least used selector, b/c w, use only use one id attribute value per page, id attribute value is not duplicated
  8. If it’s ancestor is article, it would apply
  9. A method of specifying whether or not an element borders and padding should be included in size unit. If it’s value is content-box, it doesn’t include, as the content grows the size of the element grows. If it’s value is border-box, the element stays in it’s size though the content size increases.
  10. When elements are each other vertically, the margin are not commuilative rather the larger margin will win, in these case 30 px will win. i.e. the second content has margin-top: 30 px. Check it with position property??????
  11. The clear property can have one of the following values: none - The element is not pushed below left or right floated elements. This is default left - The element is pushed below left floated elements right - The element is pushed below right floated elements both - The element is pushed below both left and right floated elements inherit - The element inherits the clear value from its parent
  12. The clear property can have one of the following values: none - The element is not pushed below left or right floated elements. This is default left - The element is pushed below left floated elements right - The element is pushed below right floated elements both - The element is pushed below both left and right floated elements inherit - The element inherits the clear value from its parent
  13. If the element after floating element are text, they will surround floating element, but if it is block level element it take the place of the floated element (see above fig) The clear property can have one of the following values: none - The element is not pushed below left or right floated elements. This is default left - The element is pushed below left floated elements right - The element is pushed below right floated elements both - The element is pushed below both left and right floated elements inherit - The element inherits the clear value from its parent
  14. Disadvantage: mobile device themselves are different size
  15. Tweeter bootstrap uses it Every frame work uses it
  16. More responsive website: Get your media queries working with the meta viewport HTML tag – YouTube – Conquering Responsive Layouts (kevinpowell.co)
  17. Mobile fisrcode for mobile version first purest approachs
  18. Its responsive grid: No more spending hours coding your own grid—Bootstrap comes with its own grid system predefined. Defining custom breakpoints for each column is a snap using their extra small, small, medium, large, and extra large breaks. You can also simply stick to the default as it might already meet the needs of your site. Its responsive images Bootstrap comes with its own code for automatically resizing images based on the current screen size. Just add the .img-responsive class to your images, and the predefined CSS rules take care of the rest. Let Bootstrap resize your images for you! Its components Bootstrap comes with a whole barrelful of components you can easily tack onto your web page, including: Navigation bars Dropdowns Progress bars Thumbnails
  19. Bootstrap CDN is the distribution of the most popular CSS framework in the world using a content delivery network. It is a geographically distributed group of servers that work together to provide fast delivery of Internet content. CDN enables a quick way to serve files over the internet such as HTML, Javascript, CSS, images, and videos. In Bootstrap’s case, the main Bootstrap javascript and stylesheet files are being served over a CDN network. Bootstrap CDN is the distribution of the most popular CSS framework in the world using a content delivery network. It is a geographically distributed group of servers that work together to provide fast delivery of Internet content. CDN enables a quick way to serve files over the internet such as HTML, Javascript, CSS, images, and videos. In Bootstrap’s case, the main Bootstrap javascript and stylesheet files are being served over a CDN network.