Introduction to HTML+CSS+Javascript.pptxAliRaza899305
Â
The document provides an introduction to HTML, CSS, and JavaScript for developing web technologies. It discusses how HTML is used to define the structure and content of a web page, CSS is used to control the visual styling of web pages, and JavaScript is used to add interactivity. It also provides examples of basic HTML tags and syntax, CSS properties and selectors, and how to insert JavaScript code. Finally, it summarizes some of the main capabilities and APIs available in JavaScript.
The document provides an introduction to web technologies including HTML, CSS, and JavaScript. It explains that HTML is used to define the structure and content of a web page, CSS is used to control the visual styling and layout, and JavaScript is used for interactivity. It also provides overviews of topics like the anatomy of a browser, HTML tags and syntax, CSS properties and selectors, and how to start developing and testing web pages locally.
The document provides an introduction to HTML, CSS, and JavaScript for creating web technologies. It discusses how to set up a development environment with a text editor and browser. It explains the basic structure and syntax of HTML, CSS, and JavaScript, including how to select and style elements with CSS and manipulate the DOM with JavaScript. Key topics covered include HTML tags, the box model, CSS selectors, layout systems like grid, and retrieving/modifying elements with JavaScript. The document serves as a high-level overview of the main technologies used for front-end web development.
HTML is used to define the structure and content of a web page. CSS controls the visual styling and layout of HTML elements, while JavaScript provides interactivity. The document discusses the basic anatomy of a browser and how HTML, CSS, and JavaScript are used together to build web pages. It provides examples of HTML tags and syntax, CSS properties and selectors, and how to insert JavaScript code.
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!đ
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!đ
GDG On Campus NBNSCOE Web Workshop Day 1 : HTML & CSSudaymore742
Â
đ 3-Day Web Development Workshop (5th-7th, 6:00-8:00 PM)
đ Day 1: HTML đ§± + CSS đš (Mayuresh & Tanuja)
đ» Day 2: JavaScript â + DOM đ (Ved & Srushti)
đ Day 3: MERN Stack đ± (Mohit)
âš Why Join? Hands-on learning, expert mentors, portfolio-ready project, and completion certificate!
đŻ For beginners, students, and web dev enthusiasts.
CSS (Cascading Style Sheets) is a stylesheet language used to control the presentation and layout of HTML documents. It allows developers to define styles for elements, such as colors, fonts, spacing, positioning, and responsiveness, to create visually appealing and consistent web pages. CSS can be applied inline, internally, or externally, and it supports features like flexbox, grid, animations, and media queries for advanced design and layout control.
CSS (Cascading Style Sheets) allows separation of document content from document presentation and behavior. CSS handles the look and formatting of a document and is effective for maintaining a consistent appearance across multiple web pages. CSS declarations apply styles to HTML elements and are organized in a cascade by importance, origin, specificity, and source order to determine which styles get applied.
HTML is a markup language used to define the structure and layout of web pages. CSS is used to style and lay out HTML elements, and JavaScript can be used to program behaviors and interactions in web pages. jQuery is a JavaScript library that simplifies HTML document traversal and manipulation, as well as event handling, animations, and Ajax interactions for rapid web development.
The document discusses HTML (Hypertext Markup Language). It provides an introduction to HTML, explaining that HTML is used to create documents for display on the World Wide Web and is made up of markup tags. It also outlines some of the basic HTML tags needed to create a simple HTML document, including <HTML>, <HEAD>, <BODY>, and common text formatting tags like <B> and <I>.
This document provides an overview of HTML 5 and related technologies. It begins with introductions to HTML, forms, and common elements. It then covers new features in HTML5 like semantic elements, audio and video embedding, and drag and drop capabilities. The document also discusses technologies like CSS and JavaScript that can enhance HTML pages. It provides syntax and code examples for various HTML elements, tags, attributes and how to integrate multimedia, APIs and styling to create dynamic and interactive web pages.
Web Designing Training in Ambala ! BATRA COMPUTER CENTREjatin batra
Â
Are you in search of Web Designing training in Ambala?
Now your search ends here... Batra Computer Centre provides you the best training in Ambala Cantt. We provide training in Basics of Computers, training in Programming Languages C, C++, HTML, PHP,Web Designing,WebDevelopment,Seo,Smo and training many other courses also provided here.
HTML is a markup language used to structure and present content on the World Wide Web. It introduces common HTML elements like headings, paragraphs, lists, links, and images. The document discusses HTML tags for text formatting, headings, paragraphs, lines, and rules. It also covers creating an HTML file, saving it, and viewing it in a web browser to see the structured content.
The document summarizes an upcoming presentation on HTML5 and PHP. It lists the group members and covers the following topics in the presentation agenda: HTML5 elements like Canvas, SVG, drag/drop, geo-location, video, audio; PHP syntax, variables, and strings; and differences between SVG and Canvas. It provides code examples and explanations for several HTML5 elements and features including Canvas, SVG, drag/drop, geo-location, video, audio, and form handling.
Raj Acharya presents details of his internship project on front-end web development. He completed a month-long training program at BIRLA Institute of Technology in Jaipur, India, where he learned HTML, CSS, and JavaScript. He describes the basic concepts and elements of HTML, including headings, paragraphs, links, images, tables, and lists. He also provides an overview of CSS and how it is used to style web pages.
Markup language classification, designing static and dynamicAnkita Bhalla
Â
The document discusses various markup languages used to create static and dynamic web pages. It describes how static pages are fixed and do not change, while dynamic pages can be modified at runtime through scripts. It provides details on HTML, CSS, JavaScript and server-side scripts for creating dynamic content. Key topics covered include using tags like <div> for layouts, <img> for images, and JavaScript for basic interactivity. The document compares the processing of static versus dynamic pages and outlines benefits of dynamic pages like personalization and database access.
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
Â
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
Ad
More Related Content
Similar to Introduction to HTML+CSS+Javascript.pptx (20)
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!đ
Ever wondered how google.com was made? How our own college website is made?đ€
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but donât know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!đ
GDG On Campus NBNSCOE Web Workshop Day 1 : HTML & CSSudaymore742
Â
đ 3-Day Web Development Workshop (5th-7th, 6:00-8:00 PM)
đ Day 1: HTML đ§± + CSS đš (Mayuresh & Tanuja)
đ» Day 2: JavaScript â + DOM đ (Ved & Srushti)
đ Day 3: MERN Stack đ± (Mohit)
âš Why Join? Hands-on learning, expert mentors, portfolio-ready project, and completion certificate!
đŻ For beginners, students, and web dev enthusiasts.
CSS (Cascading Style Sheets) is a stylesheet language used to control the presentation and layout of HTML documents. It allows developers to define styles for elements, such as colors, fonts, spacing, positioning, and responsiveness, to create visually appealing and consistent web pages. CSS can be applied inline, internally, or externally, and it supports features like flexbox, grid, animations, and media queries for advanced design and layout control.
CSS (Cascading Style Sheets) allows separation of document content from document presentation and behavior. CSS handles the look and formatting of a document and is effective for maintaining a consistent appearance across multiple web pages. CSS declarations apply styles to HTML elements and are organized in a cascade by importance, origin, specificity, and source order to determine which styles get applied.
HTML is a markup language used to define the structure and layout of web pages. CSS is used to style and lay out HTML elements, and JavaScript can be used to program behaviors and interactions in web pages. jQuery is a JavaScript library that simplifies HTML document traversal and manipulation, as well as event handling, animations, and Ajax interactions for rapid web development.
The document discusses HTML (Hypertext Markup Language). It provides an introduction to HTML, explaining that HTML is used to create documents for display on the World Wide Web and is made up of markup tags. It also outlines some of the basic HTML tags needed to create a simple HTML document, including <HTML>, <HEAD>, <BODY>, and common text formatting tags like <B> and <I>.
This document provides an overview of HTML 5 and related technologies. It begins with introductions to HTML, forms, and common elements. It then covers new features in HTML5 like semantic elements, audio and video embedding, and drag and drop capabilities. The document also discusses technologies like CSS and JavaScript that can enhance HTML pages. It provides syntax and code examples for various HTML elements, tags, attributes and how to integrate multimedia, APIs and styling to create dynamic and interactive web pages.
Web Designing Training in Ambala ! BATRA COMPUTER CENTREjatin batra
Â
Are you in search of Web Designing training in Ambala?
Now your search ends here... Batra Computer Centre provides you the best training in Ambala Cantt. We provide training in Basics of Computers, training in Programming Languages C, C++, HTML, PHP,Web Designing,WebDevelopment,Seo,Smo and training many other courses also provided here.
HTML is a markup language used to structure and present content on the World Wide Web. It introduces common HTML elements like headings, paragraphs, lists, links, and images. The document discusses HTML tags for text formatting, headings, paragraphs, lines, and rules. It also covers creating an HTML file, saving it, and viewing it in a web browser to see the structured content.
The document summarizes an upcoming presentation on HTML5 and PHP. It lists the group members and covers the following topics in the presentation agenda: HTML5 elements like Canvas, SVG, drag/drop, geo-location, video, audio; PHP syntax, variables, and strings; and differences between SVG and Canvas. It provides code examples and explanations for several HTML5 elements and features including Canvas, SVG, drag/drop, geo-location, video, audio, and form handling.
Raj Acharya presents details of his internship project on front-end web development. He completed a month-long training program at BIRLA Institute of Technology in Jaipur, India, where he learned HTML, CSS, and JavaScript. He describes the basic concepts and elements of HTML, including headings, paragraphs, links, images, tables, and lists. He also provides an overview of CSS and how it is used to style web pages.
Markup language classification, designing static and dynamicAnkita Bhalla
Â
The document discusses various markup languages used to create static and dynamic web pages. It describes how static pages are fixed and do not change, while dynamic pages can be modified at runtime through scripts. It provides details on HTML, CSS, JavaScript and server-side scripts for creating dynamic content. Key topics covered include using tags like <div> for layouts, <img> for images, and JavaScript for basic interactivity. The document compares the processing of static versus dynamic pages and outlines benefits of dynamic pages like personalization and database access.
Semantic Cultivators : The Critical Future Role to Enable AIartmondano
Â
By 2026, AI agents will consume 10x more enterprise data than humans, but with none of the contextual understanding that prevents catastrophic misinterpretations.
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025BookNet Canada
Â
Book industry standards are evolving rapidly. In the first part of this session, weâll share an overview of key developments from 2024 and the early months of 2025. Then, BookNetâs resident standards expert, Tom Richardson, and CEO, Lauren Stewart, have a forward-looking conversation about whatâs next.
Link to recording, transcript, and accompanying resource: https://bnctechforum.ca/sessions/standardsgoals-for-2025-standards-certification-roundup/
Presented by BookNet Canada on May 6, 2025 with support from the Department of Canadian Heritage.
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
Â
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnellâs ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxJustin Reock
Â
Building 10x Organizations with Modern Productivity Metrics
10x developers may be a myth, but 10x organizations are very real, as proven by the influential study performed in the 1980s, âThe Coding War Games.â
Right now, here in early 2025, we seem to be experiencing YAPP (Yet Another Productivity Philosophy), and that philosophy is converging on developer experience. It seems that with every new method we invent for the delivery of products, whether physical or virtual, we reinvent productivity philosophies to go alongside them.
But which of these approaches actually work? DORA? SPACE? DevEx? What should we invest in and create urgency behind today, so that we donât find ourselves having the same discussion again in a decade?
Technology Trends in 2025: AI and Big Data AnalyticsInData Labs
Â
At InData Labs, we have been keeping an ear to the ground, looking out for AI-enabled digital transformation trends coming our way in 2025. Our report will provide a look into the technology landscape of the future, including:
-Artificial Intelligence Market Overview
-Strategies for AI Adoption in 2025
-Anticipated drivers of AI adoption and transformative technologies
-Benefits of AI and Big data for your business
-Tips on how to prepare your business for innovation
-AI and data privacy: Strategies for securing data privacy in AI models, etc.
Download your free copy nowand implement the key findings to improve your business.
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
Spark is a powerhouse for large datasets, but when it comes to smaller data workloads, its overhead can sometimes slow things down. What if you could achieve high performance and efficiency without the need for Spark?
At S&P Global Commodity Insights, having a complete view of global energy and commodities markets enables customers to make data-driven decisions with confidence and create long-term, sustainable value. đ
Explore delta-rs + CDC and how these open-source innovations power lightweight, high-performance data applications beyond Spark! đ
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfSoftware Company
Â
Explore the benefits and features of advanced logistics management software for businesses in Riyadh. This guide delves into the latest technologies, from real-time tracking and route optimization to warehouse management and inventory control, helping businesses streamline their logistics operations and reduce costs. Learn how implementing the right software solution can enhance efficiency, improve customer satisfaction, and provide a competitive edge in the growing logistics sector of Riyadh.
Mobile App Development Company in Saudi ArabiaSteve Jonas
Â
EmizenTech is a globally recognized software development company, proudly serving businesses since 2013. With over 11+ years of industry experience and a team of 200+ skilled professionals, we have successfully delivered 1200+ projects across various sectors. As a leading Mobile App Development Company In Saudi Arabia we offer end-to-end solutions for iOS, Android, and cross-platform applications. Our apps are known for their user-friendly interfaces, scalability, high performance, and strong security features. We tailor each mobile application to meet the unique needs of different industries, ensuring a seamless user experience. EmizenTech is committed to turning your vision into a powerful digital product that drives growth, innovation, and long-term success in the competitive mobile landscape of Saudi Arabia.
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveScyllaDB
Â
Want to learn practical tips for designing systems that can scale efficiently without compromising speed?
Join us for a workshop where weâll address these challenges head-on and explore how to architect low-latency systems using Rust. During this free interactive workshop oriented for developers, engineers, and architects, weâll cover how Rustâs unique language features and the Tokio async runtime enable high-performance application development.
As you explore key principles of designing low-latency systems with Rust, you will learn how to:
- Create and compile a real-world app with Rust
- Connect the application to ScyllaDB (NoSQL data store)
- Negotiate tradeoffs related to data modeling and querying
- Manage and monitor the database for consistently low latencies
Procurement Insights Cost To Value Guide.pptxJon Hansen
Â
Procurement Insights integrated Historic Procurement Industry Archives, serves as a powerful complement â not a competitor â to other procurement industry firms. It fills critical gaps in depth, agility, and contextual insight that most traditional analyst and association models overlook.
Learn more about this value- driven proprietary service offering here.
Quantum Computing Quick Research Guide by Arthur MorganArthur Morgan
Â
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at art_morgan@att.net.
100% human made.
TrsLabs - Fintech Product & Business ConsultingTrs Labs
Â
Hybrid Growth Mandate Model with TrsLabs
Strategic Investments, Inorganic Growth, Business Model Pivoting are critical activities that business don't do/change everyday. In cases like this, it may benefit your business to choose a temporary external consultant.
An unbiased plan driven by clearcut deliverables, market dynamics and without the influence of your internal office equations empower business leaders to make right choices.
Getting things done within a budget within a timeframe is key to Growing Business - No matter whether you are a start-up or a big company
Talk to us & Unlock the competitive advantage
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxAnoop Ashok
Â
In today's fast-paced retail environment, efficiency is key. Every minute counts, and every penny matters. One tool that can significantly boost your store's efficiency is a well-executed planogram. These visual merchandising blueprints not only enhance store layouts but also save time and money in the process.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Â
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just toolsâthey're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
HCL Nomad Web â Best Practices und Verwaltung von Multiuser-Umgebungenpanagenda
Â
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-und-verwaltung-von-multiuser-umgebungen/
HCL Nomad Web wird als die nĂ€chste Generation des HCL Notes-Clients gefeiert und bietet zahlreiche Vorteile, wie die Beseitigung des Bedarfs an Paketierung, Verteilung und Installation. Nomad Web-Client-Updates werden âautomatischâ im Hintergrund installiert, was den administrativen Aufwand im Vergleich zu traditionellen HCL Notes-Clients erheblich reduziert. Allerdings stellt die Fehlerbehebung in Nomad Web im Vergleich zum Notes-Client einzigartige Herausforderungen dar.
Begleiten Sie Christoph und Marc, wÀhrend sie demonstrieren, wie der Fehlerbehebungsprozess in HCL Nomad Web vereinfacht werden kann, um eine reibungslose und effiziente Benutzererfahrung zu gewÀhrleisten.
In diesem Webinar werden wir effektive Strategien zur Diagnose und Lösung hĂ€ufiger Probleme in HCL Nomad Web untersuchen, einschlieĂlich
- Zugriff auf die Konsole
- Auffinden und Interpretieren von Protokolldateien
- Zugriff auf den Datenordner im Cache des Browsers (unter Verwendung von OPFS)
- VerstÀndnis der Unterschiede zwischen Einzel- und Mehrbenutzerszenarien
- Nutzung der Client Clocking-Funktion
What is Model Context Protocol(MCP) - The new technology for communication bw...Vishnu Singh Chundawat
Â
The MCP (Model Context Protocol) is a framework designed to manage context and interaction within complex systems. This SlideShare presentation will provide a detailed overview of the MCP Model, its applications, and how it plays a crucial role in improving communication and decision-making in distributed systems. We will explore the key concepts behind the protocol, including the importance of context, data management, and how this model enhances system adaptability and responsiveness. Ideal for software developers, system architects, and IT professionals, this presentation will offer valuable insights into how the MCP Model can streamline workflows, improve efficiency, and create more intuitive systems for a wide range of use cases.
2. Introduction
When you decide to develop an application using any
programming language, one of the first problem you
face is that programming languages do not include a
library to create User Interfaces.
You need to use some framework to access the OS
layer. Every programming language has at least one,
but you need to choose it first.
One of the nice things about developing for the web is
that the web provides a very rich and simple
framework to create applications that include lots of
features, not only interface but also access to
peripherals (audio, input, gamepads, etc), and this
API is very easy to use.
Your Code
Framework
Operative System
Hardware
3. Goals
Introduction to web technologies:
â HTML to create the document
structure and content
â CSS to control is visual aspect
â Javascript for interactivity
4. Tools
What do we need to start:
â a good web-browser (Chrome or Firefox)
â a good text editor like:
â VSCode (cross platform)
â Notepad++ (win)
â textWrangler (osx)
â sublime text (cross platform)
â ecode (cross platform)
â the example HTML code to start
5. How can I test my code
Just open the index.html from the template in your text editor and in your
browser.
When you do any change to the code, check it in the browser by pressing
F5 (refresh site)
To open the developer tools press:
Windows: Control + Shift + I or
OSX: Command + Opt + I
Other tools are online editors like scratchpad or htmledit
7. Inside a browser
Browsers have very differentiate parts.
We are interested in two of them:
â the Rendering Engine (in charge
of transforming our HTML+CSS in
a visual image).
â The Javascript Interpreter (also
known as VM), in charge of
executing the Javascript code.
9. Browsers as a renderer
Browser's act as a renderer that takes documents
and construct a visual representation of them.
Starting with the most simple one, a text document, it
will try to visualize it.
You can try, drop any .txt file into your browser to
visualize it.
The problem is that text documents without any
formatting tend to be hard to read for the user (and
quite boring).
That's why HTML was created, to give text some
format.
10. Markup language
There are many markup languages that
add special tags into the text that the
renderer wont show but use to know
how to display the text.
In HTML this tags use the next notation:
My name is <b>Javi</b>
11. HTML
HTML means Hyper Text Markup Language.
The HTML allow us to define the structure of a document or a
website.
HTML is NOT a programming language, itâs a markup language,
which means its purpose is to give structure to the content of the
website, not to define an algorithm.
It is a series of nested tags (it is a subset of XML) that contain all
the website information (like texts, images and videos). Here is an
example of tags:
<title>This is a title</title>
The HTML defines the page structure. A website can have several
HTMLs to different pages.
<html>
<head>
</head>
<body>
<div>
<p>Hi</p>
</
div>
</body>
</html>
12. HTML: basic rules
Some rules about HTML:
â It uses XML syntax (tags with attributes, can contain other tags).
<tag_name attribute="value"> content </tag_name>
â It stores all the information that must be shown to the user.
â There are different HTML elements for different types of information and behaviour.
â The information is stored in a tree-like structure (nodes that contain nodes inside) called
DOM (Document Object Model).
â It gives the document some semantic structure (pe. this is a title, this is a section, this is
a form) which is helpful for computers to understand websites content.
â It must not contain information related to how it should be displayed (that information
belongs to the CSS), so no color information, font size, position, etc.
13. HTML: syntax example
<div id="main">
<!-- this is a comment -->
This is text without a tag.
<button class="mini">press me</button>
<img src="me.png" />
</div>
14. HTML: syntax example
<div id="main">
<!-- this is a comment -->
This is text without a tag.
<button class="mini">press me</button>
<img src="me.png" />
</div>
Tag name
attributes
comment
text tag
self-closing tag
15. DOM is a tree
Every node can only have
one parent, and every node
can have several children,
so the structure looks like a
tree.
17. Although there are lots of tags in the HTML specification, 99% of the webs use a subset of
HTML tags with less that 10 tags, the most important are:
â <div>: a container, usually represents a rectangular area with information inside.
â <img/>: an image
â <a>: a clickable link to go to another URL
â <p>: a text paragraph
â <h1>: a title (h2,h3,h4 are titles of less importance)
â <input>: a widget to let the user introduce information
â <style> and <link>: to insert CSS rules
â <script>: to execute Javascript
â <span>: a null tag (doesn't do anything), good for tagging info
HTML: main tags
18. HTML: other interesting tags
There are some tags that could be useful sometimes:
â <button>: to create a button
â <audio>: for playing audio
â <video>: to play video
â <canvas>: to draw graphics from javascript
â <iframe>: to put another website inside ours
19. HTML: wrapping the info
We use HTML tags to wrap different
information on our site.
The more structure has the information, the
easier will be to access it and present it.
We can change the way the information is
represented on the screen depending on the
tags where it is contained, so we shouldn't be
worried about using too many tags.
20. HTML: tagging correctly
Try to avoid doing this:
<div>
Title
Here is some content
Here is more content
</div>
Do this instead
<div>
<h1>Title</h1>
<p>Here is content.</p>
<p>Here is more content</p>
</div>
DONT DO THIS
21. HTML good use
It is good to have all the information properly wrapped in tags that give it some
semantics.
We also can extend the code semantics by adding extra attributes to the tags:
â id: tells a unique identifier for this tag
â class: tells a generic identifier for this tag
<div id="profile-picture" class="mini-image">...</div>
22. HTML references
HTML Reference: a description of all HTML tags.
The 25 Most used tags: a list with information of the more
common tags.
HTML5 Good practices: some tips for starters
24. CSS
CSS allows us to specify how to present
(render) the document info stored in the
HTML.
Thanks to CSS we can control all the
aspects of the visualization and some other
features:
â Colors: content, background, borders
â Margins: interior margin, exterior
margin
â Position: where to put it
â Sizes: width, height
â Behaviour: changes on mouse over
25. CSS example
* {
color: blue; /*a comment */
margin: 10px;
font: 14px Tahoma;
}
This will change all the tags in my web ( â*â means all) to look blue with font Tahoma with
14px, and leaving a margin of 10px around.
26. CSS fields
Here is a list of the most common CSS fields and an example:
â color: #FF0000; red; rgba(255,00,100,1.0); //different ways to specify
colors
â background-color: red;
â background-image: url('file.png');
â font: 18px 'Tahoma';
â border: 2px solid black;
â border-top: 2px solid red;
â border-radius: 2px; //to remove corners and make them more round
â margin: 10px; //distance from the border to the outer elements
â padding: 2px; //distance from the border to the inner elements
â width: 100%; 300px; 1.3em; //many different ways to specify distances
â height: 200px;
â text-align: center;
â box-shadow: 3px 3px 5px black;
â cursor: pointer;
â display: inline-block;
â overflow: hidden;
27. CSS how to add it
There are four ways to add CSS rules to your website:
â Inserting the code inside a style tag
<style>
p { color: blue }
</style>
â Referencing an external CSS file
<link href="style.css" rel="stylesheet" />
â Using the attribute style on a tag
<p style="color: blue; margin: 10px">
â Using Javascript (we will see this one later).
28. CSS selectors
Let's start by changing the background color of one tag of our website:
div {
background-color: red;
}
This CSS rule means that every tag DIV found in our website should have a red background
color. Remember that DIVs are used mostly to represent areas of our website.
We could also change the whole website background by affecting the tag body:
body {
background-color: red;
}
29. CSS selectors
What if we want to change one specific tag (not all the tags of the same type).
We can specify more precise selectors besides the name of the tag. For instance, by class
or id. To specify a tag with a given class name, we use the dot:
p.intro {
color: red;
}
This will affect only the tags p with class name intro:
<p class="intro">
30. CSS Selectors
There are several selectors we can use to narrow our rules to very specific tags of our website.
The main selectors are:
â tag name: just the name of the tag
â p { ... } //affects to all <p> tags
â dot (.): affects to tags with that class
â p.highlight { ... } //affects all <p> tags with class="highlight"
â sharp character (#): specifies tags with that id
â p#intro { ... } //affects to the <p> tag with the id="intro"
â two dots (:): behaviour states (mouse on top)
â p:hover { ... } //affects to <p> tags with the mouse over
â brackets ([attr='value']): tags with the attribute attr with the value 'value'
â input[type="text"] {...} // affects to the input tags of the type
text
31. CSS Selectors
You can also specify tags by its context, for example: tags that are inside of tags matching a
selector. Just separate the selectors by an space:
div#main p.intro { ... }
This will affect to the p tags of class intro that are inside the tag div of id main
<div id="main">
<p class="intro">....</p> â Affects this one
</div>
<p class="intro">....</p> â but not this one
32. CSS Selectors
And you can combine selectors to narrow it down more.
div#main.intro:hover { ... }
will apply the CSS to the any tag div with id main and class intro if the mouse is over.
And you do not need to specify a tag, you can use the class or id selectors without tag, this
means it will affect to any node of id main
#main { ... }
33. CSS Selectors
If you want to select only elements that are direct child of one element (not that have an
ancestor with that rule), use the > character:
ul.menu > li { ... }
Finally, if you want to use the same CSS actions to several selectors, you can use the
comma , character:
div, p { ⊠} â this will apply to all divs and p tags
34. HTML arrange
It is important to understand how the browser
arranges the elements on the screen.
Check this tutorial where it explains the
different ways an element can be arranged
on the screen.
You can change the way elements are
arranged using the display property:
div { display: inline-block; }
Also check the property float.
35. Box Model
It is important to note that by default any
width and height specified to an element will
not take into account its margin, so a div with
width 100px and margin 10px will measure
120px on the screen, not 100px.
This could be a problem breaking your
layout.
You can change this behaviour changing the
box model of the element so the width uses
the outmost border:
div { box-sizing: border; }
36. Layout
One of the hardest parts of CSS is
construing the layout of your website (the
structure inside the window) .
By default HTML tends to put everything in
one column, which is not ideal.
There has been many proposals in CSS to
address this issue (tables, fixed divs, flex,
grid, âŠ).
37. Flexbox
The first big proposal to address the layout
was the flexbox model.
This model allows to arrange stuff in one
direction (vertically or horizontally) very
easily.
You can even choose to arrange from right
to left (reverse).
It can also be used to arrange a series of
elements in different rows.
Check the tutorial for more info.
HTML
<div class="box">
<div>One</div>
<div>Two</div>
<div>Three
<br>first line
<br>second line
</div>
</div>
CSS
.box {
display: flex;
}
38. Grid system
Because most sites are structured in a grid, I
recommend to use the CSS Grid system.
We just assign how many rows/columns a div
should use from the main grid and it will arrange
automatically.
Check this tutorial to create the site structure
easily
HTML
<div class="grid-container">
<div class="grid-item1">1</div>
<div class="grid-item2">2</div>
</div>
CSS
.grid-container {
display: grid;
grid-template-rows: 100px 100px;
grid-template-columns: 100px 100px 100px;
grid-gap: 5px;
}
.grid-item1 {
background: blue;
border: black 5px solid;
grid-column-start: 1;
grid-column-end: 5;
grid-row-start: 1;
grid-row-end: 3;
}
39. Fullscreen divs
Sometimes we want to have a div that covers
the whole screen (to make a webapp),
instead of a scrolling website (more like
regular documents).
In that case remember to use percentages to
define the size of elements, but keep in mind
that percentages are relative to the element's
parent size, so you must set the size to the
<body> and <html> element to use 100%.
CSS
html, body {
width: 100%;
height: 100%;
}
div {
margin: 0;
padding: 0;
}
#main {
width: 100%;
height: 100%;
}
41. CSS further reading
There are many more rules for selectors.
Check some of the links to understand them better.
One line layouts tutorials
Understanding the Box Model: a good explanation of how to position the information on your
document.
All CSS Selectors: the CSS selectors specification page.
CSS Transition: how to make animations just using CSS
TailwindCSS: a CSS Framework
43. Interactivity
Once the web was already being used
they realize people wanted to interact
with the websites in a more meaningful
way.
So they added an Interpreter to execute
a script language that could modify the
content of the web dynamically.
Brendan Eich was tasked to develop it in
one week and it has become one of the
most important languages.
44. Javascript
A regular programming language, easy to start, hard to
master.
Allows to give some interactivity to the elements on the web.
Syntax similar to C or Java but with no types.
You can change the content of the HTML or the CSS applied
to an element.
You can even send or retrieve information from the internet to
update the content of the web without reloading the page.
var my_number = 10;
function say( str )
{
console.log( str
);
}
say("hello");
45. Javascript: insert code
There is three ways to execute javascript code in a website:
â Embed the code in the HTML using the <script> tag.
<script> /* some code */ </script>
â Import a Javascript file using the <script> tag:
<script src="file.js" />
â Inject the code on an event inside a tag:
<button onclick="javascript: /*code*/">press me</button>
46. Javascript: Syntax
Very similar to C++ or Java but much simpler.
var my_number = 10; //this is a comment
var my_string = "hello";
var my_array = [10,20,"name",true];
var my_object = { name: "javi", city: "Barcelona" };
function say( str )
{
for(var i = 0; i < 10; ++i)
console.log(" say: " + str );
}
47. Javascript example
<html>
<body>
<h1>This is a title</h1>
<script>
var title = document.querySelector("h1");
title.innerHTML = "This is another title";
</script>
</body>
</html>
48. Javascript API
Javascript comes with a rich API to do many things like:
â Access the DOM (HTML nodes)
â Do HTTP Requests
â Play videos and sounds
â Detect user actions (mouse move, key pressed)
â Launch Threads
â Access the GPU, get the Webcam image, ...
And the API keeps growing with every new update of the standard.
Check the WEB API reference to know more
49. Javascript: retrieving element
You can get elements from the DOM (HTML tree) using different approaches.
â Crawling the HTML tree (starting from the body, and traversing its children)
â Using a selector (like in CSS)
â Attaching events listeners (calling functions when some actions are
performed)
50. Javascript: crawling the DOM
From javascript you have different variables that you can access to get
information about the website:
â document: the DOM information (HTML)
â window: the browser window
The document variable allows to crawl the tree:
document.body.children[0] // returns the first node inside body
tag
51. Javascript: using selectors
You can retrieve elements using selectors:
var nodes = document.querySelectorAll("p.intro");
will return an array with all <p class="intro"> nodes in the web.
Or if we have already a node and we want to search inside:
var node = mynode.querySelectorAll("p.intro")
52. Javascript: modify nodes
From JS you can change the attributes
mynode.id = "intro"; //sets an id
mynode.className = "important"; //set class
mynode.classList.add("good"); //to add to the current classes
Change the content
mynode.innerHTML = "<p>text to show</p>"; //change content
Modify the style (CSS)
mynode.style.color = "red"; //change any css properties
or add the behaviour of a node
mynode.addEventListener("click", function(e) {
//do something
});
53. Javascript: create nodes
Create elements:
var element = document.createElement("div");
And attach them to the DOM:
document.querySelector("#main").appendChild( element );
Or remove it from its parent:
element.remove();
You can clone an element also easily:
var cloned = element.cloneNode(true);
54. Javascript: hide and show elements
Sometimes it may be useful to hide one element or show another.
You can change an element CSS directly by accessing its property style.
To avoid being displayed on the web change display to "none"
element.style.display = "none"; //hides elements from being rendered
element.style.display = ""; //displays it again
55. Using Inputs
If you want the user to be able to input some text we use the tag <input>:
<input type="text"/>
There are other inputs, you can check this list.
From Javascript we can attach events like "click" or "keydown".
To read or modify the content of the input:
my_input_element.value = ""; //this will clear the text inside the input
56. Example of a website
HTML in index.html
<link href="style.css" rel="stylesheet"/>
<h1>Welcome</h1>
<p>
<button>Click me</button>
</p>
<script src="code.js"/>
CSS in style.css
h1 { color: #333; }
button {
border: 2px solid #AAA;
background-color: #555;
}
Javascript in code.js
//fetch the button from the DOM
var button = document.querySelector("button");
//attach and event when the user clicks it
button.addEventListener("click", myfunction);
//create the function that will be called when
the button is pressed
function myfunction()
{
//this shows a popup window
alert("button clicked!");
}
57. Execution flow
It is important to have a clear
understanding of the execution flow of
your code.
Scripts are executed when the html is
being parsed.
Be careful accessing the DOM as the
DOM wonât contain all until all the HTML
is parsed.
It is good practice to start your code with
an init function called at the end of your
HTML.
<script>
var main =
document.querySelector("#main");
//main here is null, as the element
does
//exist yet
</script>
<div id="main"></div>
<script>
var main =
document.querySelector("#main");
//main now is the right element
</script>
58. jQuery
jQuery is a library that makes working with the DOM much easier, using an unified
syntax and taking advantage of selectors:
$("p").remove(); //remove all tags p
$("#main").hide(); //hides the element of id main
$("#main").append("<h1>titulo</h1>") //adds content to an element
$("#wrap").css({ color: "red" }); //change the css
$("button#send").click( function() { /* code */ });
To include this library just add this to your HTML:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
59. Using the Dev Tools
Press Control + Shift + I (or F12) to open DevTools
60. Exercise
Create the layout for a
messaging application.
Structured like:
â Main container
â Messages area
â message
â Typing area area
â input
61. Further info
API References: DevDocs.io
Selectors: MDN Tutorial
To learn Javascript.
http://codeacademy.com
To learn jQuery:
http://docs.jquery.com/Tutorials