Movatterモバイル変換


[0]ホーム

URL:


Predhin Sapru, profile picture
Uploaded byPredhin Sapru
PDF, PPTX2,757 views

Html,javascript & css

This document provides an overview of HTML, CSS, and JavaScript for web development. It discusses the basics of each technology, how they work together, and includes the following key points:- HTML is the markup language that defines the structure and content of a web page. CSS is used to style and lay out elements on the page. JavaScript adds interactive functionality.- Events, functions, and variables are important JavaScript concepts. Events trigger actions, functions contain reusable code, and variables store and retrieve data. - CSS selectors allow styling elements by type, class, ID, and other attributes. The box model, positioning, and other properties control layout. - Common debugging tools like Firebug help

Embed presentation

Download as PDF, PPTX
HTML,JAVASCRIPT &CSSWeb is a book outlet and our website is abook
Agenda•••••Basics to Html, CSS, JavaScriptWhere this fits in Website developmentDebuggingExamplesQ/A
Introduction•Core Concept of web development••HTML + CSS + JavaScriptContent + Style + Behavior
HTML• What?• Web server: a system on the internet contains one or more web site• Web site: a collection of one or more web pages• Web pages: single disk file with a single file name• Home pages: first page in websiteo What for ?• Think about the sort of information(content) you want to put on the Web.• Set the goals for the Web site.• Organize your content into main topics.• Come up with a general structure for pages and topics.
HTML
HTML••HTML is not a programming language, it is a markup languageHTML markup tags are usually called HTML tagsoooo•••HTML tags are keywords surrounded by angle brackets like <html>HTML tags normally come in pairs like <b> and </b>The first tag in a pair is the start tag, the second tag is the end tagStart and end tags are also called opening tags and closing tagsHTML documents describe web pagesThe purpose of a web browser (like Internet Explorer or Firefox) is toread HTML documents and display them as web pages. The browserdoes not display the HTML tags, but uses the tags to interpret thecontent of the pageNote:••••The text between <html> and </html> describes the web pageThe text between <body> and </body> is the visible page contentThe text between <h1> and </h1> is displayed as a headingThe text between <p> and </p> is displayed as a paragraph
HTML••When you save an HTML file, you can use either the .htm or the .htmlfile extensionElements:Start tag *<p><ahref="default.htm" ><br />Element content End tag *This is a</p>paragraphThis is a link</a>
HTML•HTML Attributesoooo•HTML elements can have attributesAttributes provide additional information about an elementAttributes are always specified in the start tagAttributes come in name/value pairs like: name="value“Sample Attributes:Attribute ValueDescriptionclassclassname Specifies a classname for anelementididSpecifies a unique id for anelementstylestyle_defin Specifies an inline style for anitionelementtitletooltip_tex Specifies extra informationtabout an element (displayedas a tool tip)
HTML•Website Layoutso•HTML Different Doctypeso•External style sheetInternal style sheetInline stylesHtml head element:o•The doctype declaration is not an HTML tag; it is an instruction to the web browserabout what version of the markup language the page is written in.There are three ways of inserting a style sheet:ooo•Most websites have put their content in multiple columns (formatted like a magazineor newspaper)Head,Script,Base,Style,meta,titleThe HTML noscript ElementoThe <noscript> tag is used to provide an alternate content for users that havedisabled scripts in their browser or have a browser that doesn’t support client-sidescripting.
HTML
CSS•••The biggest advantage of using CSS is that, if you place the CSScode in an external style sheet, your site becomes MUCH EASIER tomaintain. You can change the layout of all your pages by editingone fileSeparates design elements from structural logicRule Structure:
CSS•Class Selectors<H1 CLASS=“warning”>Danger!</H1><P CLASS=“warning”>Be careful…</P>…….In your HTML code H1.warning {color: red;}OR to an entire class….warning {color:red;}• Css are not even• Make sure your CSS properties are supported
CSSPatternMeaning*Universal selector: matches any element.EType selector: matches any E element (i.e., an element of type E; e.g. H1 or P).EFDescendant selector: matches any F element that is a descendant of an E element.E>FChild selector: matches any F element that is a child of an element E.E+FAdjacent siblings selector: Matches any F element immediately preceded by an element E.E[foo]Attribute selector: matches any E element with the "foo" attribute set (whatever the value).E[foo="warning"]Attribute selector: matches any E element whose "foo" attribute value is exactly equal to "warning".E[foo~="warning"]Attribute selector: matches any E element whose "foo" attribute value is a list of space-separatedvalues, one of which is exactly equal to "warning".E[lang|="en"]Attribute selector: matches any E element whose "lang" attribute has a hyphen-separated list ofvalues beginning (from the left) with "en“ (e.g. en-US).DIV.warningHTML only. The same as DIV[class~="warning"].E#myidID selector: matches any E element ID equal to "myid".E:lang(c)Pseudo-class selector: matches element of type E if it is in (human) language c (the documentlanguage specifies how language is determined).E:first-childPseudo-class selector: matches element E when E is the first child of its parent.E:link, E:visitedPseudo-class selector: matches element E if E is the source anchor of a hyperlink of which thetarget is not yet visited (:link) or already visited (:visited).E:active, E:hover, E:focusDynamic Pseudo-class selector: matches E during certain user actions.E:first-line, E:first-letterPseudo-element selector: matches the first formatted line or letter of element E.
JavaScript•••••••••#
JavaScript• Eventso Events are mostly caused by user actions.o We want our JavaScript program to react to certain events. Thiscan be done with the help of event-handlerso example of the event-handler onClick: <form><inputtype="button" value="Click me" onClick="alert(’Yo’)"></form> whynot onClick="alert(“Yo”)“?o Events are normally used in combination with functions, and thefunction will not be executed before the event occurs!o Eg: <html> <head> <script type="text/javascript"> <!-- functionpopup() { alert("Hello World") } //--> </script> </head> <body><input type="button" value="Click Me!" onclick="popup()"><br /><a href="#" onmouseover="" onMouseout="popup()"> HoverMe!</a> </body> </html>
JavaScript• EventsEventAttributeDescriptionDOMclickonclickThe event occurs when the user clicks on an element2dblclickondblclickThe event occurs when the user double-clicks on anelement2mousedownonmousedownThe event occurs when a user presses a mouse buttonover an element2mousemoveonmousemoveThe event occurs when a user moves the mouse pointer 2over an elementmouseoveronmouseoverThe event occurs when a user mouse over an elementmouseoutonmouseoutThe event occurs when a user moves the mouse pointer 2out of an elementmouseuponmouseupThe event occurs when a user releases a mouse buttonover an element22
JavaScript• Variableso Variables are used to store data.o A variable is a "container" for information youwant to store. A variable's value can changeduring the script. You can refer to a variable byname to see its value or to change its value.o Rules for variable names:o Variable names are case sensitiveo They must begin with a letter or the underscorecharacter• strname – STRNAME (not same)
JavaScript• Event Hierarchyo Take the case of a Login Page
JavaScript• JavaScript No'so Global variables• var foo = "global"; //Don't do this function(){ var bar = "local"; //This is ok }();• function(){ foo = "global"; //Don't do this var bar = "local"; //This is ok }();o Inline JavaScript• Inline JavaScript is any JavaScript code that is mixed with HTML. There are twoprimary ways in which you can do this:o Eval• Also like most other programming languages, using eval in JavaScript isconsidered.. well, evil. If you find yourself using eval, there’s a big chance yourapproach is wrong.• Eg:var strJSON = '{"result":true,"count":1}';var objJSON = eval("(function(){return " + strJSON + ";})()");alert(objJSON.result);alert(objJSON.count);
JavaScript• JavaScript No'so alert("In your face")• Most of the time, using the alert method is unnecessary. The most prevalentmisuse of this method is for debugging purposes, but using tools such as Firebugand equivalents for other browsers is a much better and more efficient way todebug JavaScript code.o element.style• You can change an element’s style directly by changing properties on its styleproperty:• el.style.backgroundColor = "#ff0000";el.style.color = "#00ff00"; This is usually not agood idea because you want to keep the styling separate from the behaviourand changing an element’s style directly will override anything you’ve definedin your CSS. Better way here is to add a class to the element
Debugging• Firebug
Q/A

Recommended

PPTX
PDF
HTML and CSS crash course!
PPTX
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
PPTX
Html n CSS
PDF
Web front end development introduction to html css and javascript
PPTX
Css Basics
PPTX
Html notes with Examples
 
PPTX
HTML, CSS And JAVASCRIPT!
PDF
Intro to HTML and CSS basics
PDF
Html / CSS Presentation
PDF
Intro to HTML & CSS
ODP
Introduction of Html/css/js
PPT
JavaScript - An Introduction
PDF
Introduction to HTML and CSS
PPTX
HTML-(workshop)7557.pptx
ODP
Html
PPTX
Html
PPTX
HTML, CSS and Java Scripts Basics
ODP
CSS Basics
PPT
CSS for Beginners
PPT
CSS Basics
PPSX
Html introduction
PPTX
Html5 and-css3-overview
PPTX
Css selectors
PPTX
Html forms
PPTX
HTML Forms
PPT
Html Ppt
PPT
Software Deployment Principles & Practices
PDF
Architecture of the Web browser

More Related Content

PPTX
PDF
HTML and CSS crash course!
PPTX
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
PPTX
Html n CSS
PDF
Web front end development introduction to html css and javascript
PPTX
Css Basics
PPTX
Html notes with Examples
 
PPTX
HTML, CSS And JAVASCRIPT!
HTML and CSS crash course!
Basic of HTML, CSS(StyleSheet), JavaScript(js), Bootstrap, JSON & AngularJS
Html n CSS
Web front end development introduction to html css and javascript
Css Basics
Html notes with Examples
 
HTML, CSS And JAVASCRIPT!

What's hot

PDF
Intro to HTML and CSS basics
PDF
Html / CSS Presentation
PDF
Intro to HTML & CSS
ODP
Introduction of Html/css/js
PPT
JavaScript - An Introduction
PDF
Introduction to HTML and CSS
PPTX
HTML-(workshop)7557.pptx
ODP
Html
PPTX
Html
PPTX
HTML, CSS and Java Scripts Basics
ODP
CSS Basics
PPT
CSS for Beginners
PPT
CSS Basics
PPSX
Html introduction
PPTX
Html5 and-css3-overview
PPTX
Css selectors
PPTX
Html forms
PPTX
HTML Forms
PPT
Html Ppt
Intro to HTML and CSS basics
Html / CSS Presentation
Intro to HTML & CSS
Introduction of Html/css/js
JavaScript - An Introduction
Introduction to HTML and CSS
HTML-(workshop)7557.pptx
Html
Html
HTML, CSS and Java Scripts Basics
CSS Basics
CSS for Beginners
CSS Basics
Html introduction
Html5 and-css3-overview
Css selectors
Html forms
HTML Forms
Html Ppt

Viewers also liked

PPT
Software Deployment Principles & Practices
PDF
Architecture of the Web browser
PPTX
DNS & HTTP overview
PPT
@Html
PPTX
TCP/IP Protocols
PPTX
TCP/IP and DNS
PPTX
Web basics
PDF
An introduction to Web 2.0: The User Role
PPT
Introduction to Web 2.0
PPTX
Fundamentos técnicos de internet
PDF
HTML & JavaScript Introduction
PPSX
Putting SOAP to REST
PDF
Restful web services by Sreeni Inturi
PPT
Web of Science: REST or SOAP?
PPT
Fundamentos técnicos de internet
DOCX
Kanchan Ghangrekar_SrTestingAnalyst
PPTX
Fundamentos técnicos de internet
PPTX
Web Application Development
PPT
Web 2.0 Introduction
PPT
Dns introduction
Software Deployment Principles & Practices
Architecture of the Web browser
DNS & HTTP overview
@Html
TCP/IP Protocols
TCP/IP and DNS
Web basics
An introduction to Web 2.0: The User Role
Introduction to Web 2.0
Fundamentos técnicos de internet
HTML & JavaScript Introduction
Putting SOAP to REST
Restful web services by Sreeni Inturi
Web of Science: REST or SOAP?
Fundamentos técnicos de internet
Kanchan Ghangrekar_SrTestingAnalyst
Fundamentos técnicos de internet
Web Application Development
Web 2.0 Introduction
Dns introduction

Similar to Html,javascript & css

PPTX
An Overview of HTML, CSS & Java Script
PPTX
Introduction to Web Development.pptx
PPTX
Introduction to Web Development.pptx
PPTX
Bootcamp - Web Development Session 2
PPTX
Web technologies-course 07.pptx
PDF
Presentation on htmlcssjs-130221085257-phpapp02.pdf
PPTX
Dsc Charusat Learning React Part 1
PPTX
WELCOME (recovernjkgnjvnvnfjkvnjknnbfjked).pptx
PPT
Dhtml chapter2
PPTX
Web Development Fundamentals UNIT 1 & 2.pptx
PPTX
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
PPTX
Introduction to Web Development.pptx
PDF
HTML_CSS_JS Workshop
PPT
SDP_-_Module_4.ppt
PPTX
Before start
PPTX
Presentation
PDF
Fccwc326
PPT
A quick guide to Css and java script
PDF
WEB DEVELOPMENT20CS41.pdf
An Overview of HTML, CSS & Java Script
Introduction to Web Development.pptx
Introduction to Web Development.pptx
Bootcamp - Web Development Session 2
Web technologies-course 07.pptx
Presentation on htmlcssjs-130221085257-phpapp02.pdf
Dsc Charusat Learning React Part 1
WELCOME (recovernjkgnjvnvnfjkvnjknnbfjked).pptx
Dhtml chapter2
Web Development Fundamentals UNIT 1 & 2.pptx
Tech Winter Break GDG Oncampus Sri Vasavi Engineering College
Introduction to Web Development.pptx
HTML_CSS_JS Workshop
SDP_-_Module_4.ppt
Before start
Presentation
Fccwc326
A quick guide to Css and java script
WEB DEVELOPMENT20CS41.pdf

Recently uploaded

PDF
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
PDF
Vibe Coding vs. Spec-Driven Development [Free Meetup]
PPTX
Coded Agents – with UiPath SDK + LangGraph [Virtual Hands-on Workshop]
PPTX
wob-report.pptxwob-report.pptxwob-report.pptx
PDF
Session 1 - Solving Semi-Structured Documents with Document Understanding
PDF
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
PDF
Dev Dives: AI that builds with you - UiPath Autopilot for effortless RPA & AP...
PDF
Unser Jahresrückblick – MarvelClient in 2025
PDF
The year in review - MarvelClient in 2025
PDF
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
PDF
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
PDF
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
PPT
software-security-intro in information security.ppt
PDF
ElyriaSoftware — Powering the Future with Blockchain Innovation
PDF
The major tech developments for 2026 by Pluralsight, a research and training ...
PDF
API-First Architecture in Financial Systems
PPTX
cybercrime in Information security .pptx
PDF
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
PPTX
From Backup to Resilience: How MSPs Are Preparing for 2026
 
PPTX
Cybercrime in the Digital Age: Risks, Impact & Protection
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
Vibe Coding vs. Spec-Driven Development [Free Meetup]
Coded Agents – with UiPath SDK + LangGraph [Virtual Hands-on Workshop]
wob-report.pptxwob-report.pptxwob-report.pptx
Session 1 - Solving Semi-Structured Documents with Document Understanding
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
Dev Dives: AI that builds with you - UiPath Autopilot for effortless RPA & AP...
Unser Jahresrückblick – MarvelClient in 2025
The year in review - MarvelClient in 2025
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
software-security-intro in information security.ppt
ElyriaSoftware — Powering the Future with Blockchain Innovation
The major tech developments for 2026 by Pluralsight, a research and training ...
API-First Architecture in Financial Systems
cybercrime in Information security .pptx
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
From Backup to Resilience: How MSPs Are Preparing for 2026
 
Cybercrime in the Digital Age: Risks, Impact & Protection

Html,javascript & css

  • 1.
    HTML,JAVASCRIPT &CSSWeb isa book outlet and our website is abook
  • 2.
    Agenda•••••Basics to Html,CSS, JavaScriptWhere this fits in Website developmentDebuggingExamplesQ/A
  • 3.
    Introduction•Core Concept ofweb development••HTML + CSS + JavaScriptContent + Style + Behavior
  • 4.
    HTML• What?• Webserver: a system on the internet contains one or more web site• Web site: a collection of one or more web pages• Web pages: single disk file with a single file name• Home pages: first page in websiteo What for ?• Think about the sort of information(content) you want to put on the Web.• Set the goals for the Web site.• Organize your content into main topics.• Come up with a general structure for pages and topics.
  • 5.
  • 6.
    HTML••HTML is nota programming language, it is a markup languageHTML markup tags are usually called HTML tagsoooo•••HTML tags are keywords surrounded by angle brackets like <html>HTML tags normally come in pairs like <b> and </b>The first tag in a pair is the start tag, the second tag is the end tagStart and end tags are also called opening tags and closing tagsHTML documents describe web pagesThe purpose of a web browser (like Internet Explorer or Firefox) is toread HTML documents and display them as web pages. The browserdoes not display the HTML tags, but uses the tags to interpret thecontent of the pageNote:••••The text between <html> and </html> describes the web pageThe text between <body> and </body> is the visible page contentThe text between <h1> and </h1> is displayed as a headingThe text between <p> and </p> is displayed as a paragraph
  • 7.
    HTML••When you savean HTML file, you can use either the .htm or the .htmlfile extensionElements:Start tag *<p><ahref="default.htm" ><br />Element content End tag *This is a</p>paragraphThis is a link</a>
  • 8.
    HTML•HTML Attributesoooo•HTML elementscan have attributesAttributes provide additional information about an elementAttributes are always specified in the start tagAttributes come in name/value pairs like: name="value“Sample Attributes:Attribute ValueDescriptionclassclassname Specifies a classname for anelementididSpecifies a unique id for anelementstylestyle_defin Specifies an inline style for anitionelementtitletooltip_tex Specifies extra informationtabout an element (displayedas a tool tip)
  • 9.
    HTML•Website Layoutso•HTML DifferentDoctypeso•External style sheetInternal style sheetInline stylesHtml head element:o•The doctype declaration is not an HTML tag; it is an instruction to the web browserabout what version of the markup language the page is written in.There are three ways of inserting a style sheet:ooo•Most websites have put their content in multiple columns (formatted like a magazineor newspaper)Head,Script,Base,Style,meta,titleThe HTML noscript ElementoThe <noscript> tag is used to provide an alternate content for users that havedisabled scripts in their browser or have a browser that doesn’t support client-sidescripting.
  • 10.
  • 11.
    CSS•••The biggest advantageof using CSS is that, if you place the CSScode in an external style sheet, your site becomes MUCH EASIER tomaintain. You can change the layout of all your pages by editingone fileSeparates design elements from structural logicRule Structure:
  • 12.
    CSS•Class Selectors<H1 CLASS=“warning”>Danger!</H1><PCLASS=“warning”>Be careful…</P>…….In your HTML code H1.warning {color: red;}OR to an entire class….warning {color:red;}• Css are not even• Make sure your CSS properties are supported
  • 13.
    CSSPatternMeaning*Universal selector: matchesany element.EType selector: matches any E element (i.e., an element of type E; e.g. H1 or P).EFDescendant selector: matches any F element that is a descendant of an E element.E>FChild selector: matches any F element that is a child of an element E.E+FAdjacent siblings selector: Matches any F element immediately preceded by an element E.E[foo]Attribute selector: matches any E element with the "foo" attribute set (whatever the value).E[foo="warning"]Attribute selector: matches any E element whose "foo" attribute value is exactly equal to "warning".E[foo~="warning"]Attribute selector: matches any E element whose "foo" attribute value is a list of space-separatedvalues, one of which is exactly equal to "warning".E[lang|="en"]Attribute selector: matches any E element whose "lang" attribute has a hyphen-separated list ofvalues beginning (from the left) with "en“ (e.g. en-US).DIV.warningHTML only. The same as DIV[class~="warning"].E#myidID selector: matches any E element ID equal to "myid".E:lang(c)Pseudo-class selector: matches element of type E if it is in (human) language c (the documentlanguage specifies how language is determined).E:first-childPseudo-class selector: matches element E when E is the first child of its parent.E:link, E:visitedPseudo-class selector: matches element E if E is the source anchor of a hyperlink of which thetarget is not yet visited (:link) or already visited (:visited).E:active, E:hover, E:focusDynamic Pseudo-class selector: matches E during certain user actions.E:first-line, E:first-letterPseudo-element selector: matches the first formatted line or letter of element E.
  • 14.
    JavaScript•••••••••#"https://www.slideshare.net/slideshow/htmljavascript-css/29381671#15">JavaScript• Eventso Eventsare mostly caused by user actions.o We want our JavaScript program to react to certain events. Thiscan be done with the help of event-handlerso example of the event-handler onClick: <form><inputtype="button" value="Click me" onClick="alert(’Yo’)"></form> whynot onClick="alert(“Yo”)“?o Events are normally used in combination with functions, and thefunction will not be executed before the event occurs!o Eg: <html> <head> <script type="text/javascript"> <!-- functionpopup() { alert("Hello World") } //--> </script> </head> <body><input type="button" value="Click Me!" onclick="popup()"><br /><a href="#" onmouseover="" onMouseout="popup()"> HoverMe!</a> </body> </html>
  • 16.
    JavaScript• EventsEventAttributeDescriptionDOMclickonclickThe eventoccurs when the user clicks on an element2dblclickondblclickThe event occurs when the user double-clicks on anelement2mousedownonmousedownThe event occurs when a user presses a mouse buttonover an element2mousemoveonmousemoveThe event occurs when a user moves the mouse pointer 2over an elementmouseoveronmouseoverThe event occurs when a user mouse over an elementmouseoutonmouseoutThe event occurs when a user moves the mouse pointer 2out of an elementmouseuponmouseupThe event occurs when a user releases a mouse buttonover an element22
  • 17.
    JavaScript• Variableso Variablesare used to store data.o A variable is a "container" for information youwant to store. A variable's value can changeduring the script. You can refer to a variable byname to see its value or to change its value.o Rules for variable names:o Variable names are case sensitiveo They must begin with a letter or the underscorecharacter• strname – STRNAME (not same)
  • 18.
    JavaScript• Event HierarchyoTake the case of a Login Page
  • 19.
    JavaScript• JavaScript No'soGlobal variables• var foo = "global"; //Don't do this function(){ var bar = "local"; //This is ok }();• function(){ foo = "global"; //Don't do this var bar = "local"; //This is ok }();o Inline JavaScript• Inline JavaScript is any JavaScript code that is mixed with HTML. There are twoprimary ways in which you can do this:o Eval• Also like most other programming languages, using eval in JavaScript isconsidered.. well, evil. If you find yourself using eval, there’s a big chance yourapproach is wrong.• Eg:var strJSON = '{"result":true,"count":1}';var objJSON = eval("(function(){return " + strJSON + ";})()");alert(objJSON.result);alert(objJSON.count);
  • 20.
    JavaScript• JavaScript No'soalert("In your face")• Most of the time, using the alert method is unnecessary. The most prevalentmisuse of this method is for debugging purposes, but using tools such as Firebugand equivalents for other browsers is a much better and more efficient way todebug JavaScript code.o element.style• You can change an element’s style directly by changing properties on its styleproperty:• el.style.backgroundColor = "#ff0000";el.style.color = "#00ff00"; This is usually not agood idea because you want to keep the styling separate from the behaviourand changing an element’s style directly will override anything you’ve definedin your CSS. Better way here is to add a class to the element
  • 21.
  • 22.

[8]ページ先頭

©2009-2025 Movatter.jp