Html coding

Briana VanBuskirk
Briana VanBuskirkMultimedia Designer
Coding
HTML Basics
What is HTML?
• Hypertext Markup Language
• Using HTML, text is formatted by wrapping it in a tag.
• The tags provide instructions to the browser (Safari, IE,
Firefox, Chrome, etc.) for how to render the text on screen.
<h2>Text wrapped in an heading level 2 tag looks like this</h2>
START TAG END TAG
Tags-How Tagging Works
3 Parts of an HTML Document
• An HTML document is divided into three sections:
1) Declarations 2) Head 3) Body
1
2
3
Document Type
• The <!DOCTYPE> declaration must be the very first
thing in your HTML document, before the <html> tag.
• The <!DOCTYPE> declaration is not an HTML tag; it is
an instruction to the web browser about what version of
HTML the page is written in.
Starting and Ending
your Code
• The first tag you need is:
<html>
*EVERYTHING INBETWEEN
</html>
GETTING STARTED
• OPEN UP NOTEPAD ON YOUR COMPUTERS
• IF YOU’RE WORKING FROM A MAC DOWNLOAD
TEXTWRANGLER
• Start writing your code:
<html>
</html>
Inside <html> </html>
There are 2 sections within the <html></html>tags:
• <head> </head>
The head tag contains information about the page
• <body> </body>
Actual content displayed to the user on the web page
Type that out in Notepad
<html>
<head>
</head>
<body>
</body>
</html>
Inside <head> </head>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
</body>
</html>
Now Save it
1. Save as html file in a folder titled “HTML”
(type “.html” at end of file name if necessary)
2. OPEN FILE in WEB BROWSER-drag file into a new tab
3. You will see the TITLE on the tab (nothing on pg. yet)
Adding Content
• Inside <body> </body>
• HEADING TAGS
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
TEST THAT OUT!
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
</body>
</html>
PARAGRAPH TAG
<p><p/>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my
students are wonderful and talented. They are all going to
understand basic coding by the end of this class.</p>
</body>
</html>
Add another paragraph
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my
students are wonderful and talented. They are all going to understand
basic coding by the end of this class.</p>
<p>This is my second paragraph. As you can see, it is below
my first paragraph.</p>
</body>
</html>
Breaking up a Paragraph
• </br> - another self closing tag
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my students are
wonderful and talented. <br/>They are all going to understand basic coding by the
end of this class. Oh, this is an example of a break tag that is dividing this
paragraph into two lines. Do you see it?</p>
<p>This is my second paragraph. As you can see, it is below my first
paragraph.</p>
</body>
</html>
Changing Text attributes
• <i></i> italics
• <em></em> italics
• <strong></strong> bold
• <b></b> Bold
• <u></u> underlined
Adding emphasis in a paragraph
<p>
This is my <i>first year</i> teaching these classes.
All of my students are <strong>wonderful and
talented.</strong>
They are all going to <em>understand</em> basic
<em><u>coding</em></u> by the end of this class.
</p>
Adding a line
• <hr/> - self closing tag
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<h1>Hello World</h1>
<h2>My Name is Briana</h2>
<h3>I am your teacher</h3>
<p>This is my first year teaching these classes. All of my students are wonderful and
talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is
an example of a break tag that is dividing this paragraph into two lines. Do you see it? </p>
<p>This is my second paragraph. As you can see, it is below my first
paragraph.</p>
<hr/>
<img src="http://uhaweb.hartford.edu/aschmidt/kitten11.jpg"/>
</body>
</html>
Creating Bulleted Lists
• To create a bullet pointed list we will use an
unordered list <ul></ul>
• The whole list is wrapped in UL tags and then all of the elements in the list are
wrapped in <li></li> tags
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</body>
</html>
Creating Numbered Lists
• Instead of <ul></ul> you will use <ol></ol>
• The whole list is wrapped in OL tags and then all of the elements in the
list are wrapped in <li></li> tags
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
</body>
</html>
Creating Definition Lists
• <dl></dl>
• The whole list is wrapped in dl tags and then all of the elements in the list are
wrapped in either <dt></dt> or <dd></dd>
<html>
<head>
<title>Title of my Page</title>
</head>
<body>
<dl>
<dt>term1</dt>
<dd>definition 1</dd>
<dt>term2</dt>
<dd>definition 2</dd>
</dl>
</body>
</html>
Adding an IMAGE
• Find an image on Google
• Click on it
• Click View Image (so the image is on it’s own page)
• Copy the URL
• Now we will add it to our code
Inserting Image from Web
<img src=“INSERTLINKHERE”/>
Resize the image (below)
<img src=“LINK” alt=“displaytext” style=“width: #; #;”>
Adding Image from Folder
• Create a file in your HTML folder titled IMAGES
• Save an image in the Images folder
• <img src=”images/TitleOfYourImage.jpg"
alt=”NameYourImage" style="width:#px; height:#px”/>
Add a video from
Youtube
Get the embed code from YOUTUBE
<iframe width=”#" height=”#" src=“YOUTUBE LINK HERE"
frameborder="0" allowfullscreen></iframe>
Creating Link
Open link in new tab
<a href="http://facebook.com" target="_blank">Click
Here<a/>
Links from Icons
<a href=”WEBSITELINK"> <img src=”ICON"alt="Youtube
Link" width=”#" height=”#"></a>
HTML Text Color
<h1 style=“color:blue;”>This is a
heading</h1>
<p style="color:red;">This is a
paragraph.</p>
Change Background color
to a line of text
The <span> Element
• The <span> element is often used as a container for
some text.
• The <span> element has no required attributes, but both
style and class are common.
• When used together with CSS, the <span> element can
be used to style parts of the text:
The <span> Element
<!DOCTYPE html>
<html>
<body>
<h1>My <span style="color:red">Important</span>
Heading</h1>
</body>
</html>
HTML Fonts
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
HTML Text Size
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>v
HTML Text Alignment
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
HTML Background Color
• <!DOCTYPE html>
• <html>
• <body style="background-color:powderblue;">
• <h1>This is a heading</h1>
• <p>This is a paragraph.</p>
• </body>
• </html>
HTML Background Image from File
• YOU MUST HAVE YOUR FILE SAVES AS INDEX.HTML
<html>
<head> <title>Title of my Page</title>
<body background = ”images/watercolor.jpg">
*everything else
</body>
</html>
CSS
• CSS stands for Cascading Style Sheets.
• CSS describes how HTML elements are to be displayed
on screen, paper, or in other media.
• CSS saves a lot of work. It can control the layout of
multiple web pages all at once.
CSS can be added to HTML elements in 3 ways:
• Inline - by using the style attribute in HTML elements
• Internal - by using a <style> element in the <head>
section
• External - by using an external CSS file
Inline CSS
• <h1 style="color:blue;">This is a Blue Heading</h1>
Internal CSS
• An internal CSS is used to define a style for a single HTML page.
• An internal CSS is defined in the <head> section of an HTML page, within a <style>
element:
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS Background Image from Link
<html>
<head> <title>Title of my Page</title>
<style>
body {
background-image: url(”LINKHERE");
}
</style>
</head>
<body>
CSS Border
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS Padding
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
padding: 30px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS Margin
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 1px solid powderblue;
margin: 50px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
CSS id Attribute
<!DOCTYPE html>
<html>
<head>
<style>
#p01 {
color: blue;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p id="p01">I am different.</p>
</body>
</html>
CSS Class Attribute
<!DOCTYPE html>
<html>
<head>
<style>
p.different {
color: red;
}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p class=”different">I am different.</p>
<p>This is a paragraph.</p>
<p class=”different">I am different too.</p>
</body>
</html>
The <div> Element
• The <div> element is often used as a container for other
HTML elements.
• The <div> element has no required attributes, but both
style and class are common.
• When used together with CSS, the <div> element can be
used to style blocks of content:
The <div> Element
<!DOCTYPE html>
<html>
<body>
<p>This is some text.</p>
<div style="color:#0000FF">
<h3>This is a heading in a div element</h3>
<p>This is some text in a div element.</p>
</div>
<p>This is some text.</p>
</body>
</html>
The <div> Element
<!DOCTYPE html>
<html>
<body>
<div style="background-
color:black;color:white;padding:20px;">
<h2>London</h2>
<p>London is the capital city of England. It is the most
populous city in the United Kingdom, with a metropolitan
area of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a
major settlement for two millennia, its history going back
to its founding by the Romans, who named it
Londinium.</p>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
div.cities {
background-color: black;
color: white;
margin: 20px 0 20px 0;
padding: 20px;
}
</style>
</head>
<body>
<div class="cities">
<h2>London</h2>
<p>London is the capital of England. It is the most populous city in the United Kingdom, with a metropolitan
area of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a major settlement for two millennia, its history going
back to its founding by the Romans, who named it Londinium.</p>
</div>
<div class="cities">
<h2>Paris</h2>
<p>Paris is the capital and most populous city of France.</p>
<p>Situated on the Seine River, it is at the heart of the Île-de-France region, also known as the région
parisienne.</p>
<p>Within its metropolitan area is one of the largest population centers in Europe, with over 12 million
inhabitants.</p>
</div>
HTML LAYOUT
EXAMPLE (inside <head> tag)
nav ul {
list-style-type: none;
padding: 0;
}
nav ul a {
text-decoration: none;
}
article {
margin-left: 170px;
border-left: 1px solid gray;
padding: 1em;
overflow: hidden;
}
</style>
</head>
<!DOCTYPE html>
<html>
<head>
<style>
div.container {
width: 100%;
border: 1px solid gray;
}
header, footer {
padding: 1em;
color: white;
background-color: black;
clear: left;
text-align: center;
}
nav {
float: left;
max-width: 160px;
margin: 0;
padding: 1em;
}
Example (inside <body>)
<article>
<h1>London</h1>
<p>London is the capital city of England. It
is the most populous city in the United
Kingdom, with a metropolitan area of over 13
million inhabitants.</p>
<p>Standing on the River Thames, London
has been a major settlement for two
millennia, its history going back to its
founding by the Romans, who named it
Londinium.</p>
</article>
<footer>Copyright &copy;
W3Schools.com</footer>
</div>
</body>
</html>
<body>
<div class="container">
<header>
<h1>City Gallery</h1>
</header>
<nav>
<ul>
<li>London</li>
<li>Paris</li>
<li>Tokyo</li>
</ul>
</nav>
Html coding
See what you can come
up with!
1 von 56

Recomendados

Basic HTML von
Basic HTMLBasic HTML
Basic HTMLSayan De
4.8K views66 Folien
HTML (Web) basics for a beginner von
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginnerJayapal Reddy Nimmakayala
1.7K views37 Folien
Html ppt von
Html pptHtml ppt
Html pptsantosh lamba
10.3K views39 Folien
How to learn HTML in 10 Days von
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 DaysManoj kumar Deswal
8.6K views72 Folien
Html von
HtmlHtml
HtmlNandakumar Ganapathy
1.5K views41 Folien
HTML presentation for beginners von
HTML presentation for beginnersHTML presentation for beginners
HTML presentation for beginnersjeroenvdmeer
68.7K views26 Folien

Más contenido relacionado

Was ist angesagt?

Html von
HtmlHtml
HtmlBhumika Ratan
56.7K views43 Folien
Html von
HtmlHtml
HtmlCerise Anderson
3K views36 Folien
Introduction to Cascading Style Sheets (CSS) von
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Chris Poteet
11.7K views27 Folien
Introduction to html von
Introduction to htmlIntroduction to html
Introduction to htmleShikshak
8.5K views18 Folien
Html presentation von
Html presentationHtml presentation
Html presentationAmber Bhaumik
34.4K views34 Folien
Introduction To HTML von
Introduction To HTMLIntroduction To HTML
Introduction To HTMLMehul Patel
3.5K views33 Folien

Was ist angesagt?(20)

Introduction to Cascading Style Sheets (CSS) von Chris Poteet
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet11.7K views
Introduction to html von eShikshak
Introduction to htmlIntroduction to html
Introduction to html
eShikshak8.5K views
Introduction To HTML von Mehul Patel
Introduction To HTMLIntroduction To HTML
Introduction To HTML
Mehul Patel3.5K views
css.ppt von bhasula
css.pptcss.ppt
css.ppt
bhasula18.2K views
Html5 tutorial for beginners von Singsys Pte Ltd
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd16.3K views
Eye catching HTML BASICS tips: Learn easily von shabab shihan
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan2.8K views
Lecture 2 introduction to html von palhaftab
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
palhaftab6.3K views
Introduction to CSS von Amit Tyagi
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi45.3K views

Destacado

Uploading index-sallie von
Uploading index-sallieUploading index-sallie
Uploading index-sallieBriana VanBuskirk
525 views10 Folien
Copyright law von
Copyright lawCopyright law
Copyright lawBriana VanBuskirk
889 views47 Folien
Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5° von
Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5°Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5°
Plan de clase i.e lorenzo yalí lenguaje 2017 grado 5°viviana marcela pulgarin alzate
480 views13 Folien
Aval. diag _mat_4_ano_2014 von
Aval. diag _mat_4_ano_2014Aval. diag _mat_4_ano_2014
Aval. diag _mat_4_ano_2014Noeme Martins
707 views7 Folien
Antecedentes Nathalia Velandia von
Antecedentes Nathalia VelandiaAntecedentes Nathalia Velandia
Antecedentes Nathalia VelandiaNathalia Velandia
204 views4 Folien
Clasificacion de empresas von
Clasificacion de empresasClasificacion de empresas
Clasificacion de empresasPEDRITO Hernandez
1.4K views10 Folien

Destacado(20)

Aval. diag _mat_4_ano_2014 von Noeme Martins
Aval. diag _mat_4_ano_2014Aval. diag _mat_4_ano_2014
Aval. diag _mat_4_ano_2014
Noeme Martins707 views
Lời từ chối hoàn hảo -- william ury von Thuyet Nguyen
Lời từ chối hoàn hảo --  william uryLời từ chối hoàn hảo --  william ury
Lời từ chối hoàn hảo -- william ury
Thuyet Nguyen2.9K views
Vía crucis 2017 von franfrater
Vía crucis 2017Vía crucis 2017
Vía crucis 2017
franfrater382 views
Aval. diag _mat_4_ano_2014 von Noeme Martins
Aval. diag _mat_4_ano_2014Aval. diag _mat_4_ano_2014
Aval. diag _mat_4_ano_2014
Noeme Martins540 views
La Hoja von devis17
La HojaLa Hoja
La Hoja
devis17184 views
Anatomy of Respiratory System von Lafi Alanazi
Anatomy of Respiratory SystemAnatomy of Respiratory System
Anatomy of Respiratory System
Lafi Alanazi143 views
Etapa 1 von mrcrmn
Etapa 1Etapa 1
Etapa 1
mrcrmn114 views
Introduction to html von vikasgaur31
Introduction to htmlIntroduction to html
Introduction to html
vikasgaur3171.7K views
HTML, CSS and Java Scripts Basics von Sun Technlogies
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies4.7K views

Similar a Html coding

What is HTML - An Introduction to HTML (Hypertext Markup Language) von
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)Ahsan Rahim
1.8K views39 Folien
HTML, CSS, JavaScript for beginners von
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersPrakritiDhang
177 views24 Folien
HTML and CSS von
HTML and CSSHTML and CSS
HTML and CSSKetan Ghumatkar
116 views17 Folien
uptu web technology unit 2 html von
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 htmlAbhishek Kesharwani
540 views15 Folien
Html2 von
Html2Html2
Html2Abhishek Kesharwani
755 views14 Folien
02 HTML-01.pdf von
02 HTML-01.pdf02 HTML-01.pdf
02 HTML-01.pdfEshaYasir1
15 views57 Folien

Similar a Html coding(20)

What is HTML - An Introduction to HTML (Hypertext Markup Language) von Ahsan Rahim
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim1.8K views
HTML, CSS, JavaScript for beginners von PrakritiDhang
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginners
PrakritiDhang177 views
Basics of html for web development by software outsourcing company india von Jignesh Aakoliya
Basics of html for web development   by software outsourcing company indiaBasics of html for web development   by software outsourcing company india
Basics of html for web development by software outsourcing company india
Jignesh Aakoliya289 views
Css with example von reshmy12
Css with exampleCss with example
Css with example
reshmy12331 views
Web Development Using CSS3 von Anjan Mahanta
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
Anjan Mahanta1.1K views
Web Development Using CSS3 von Anjan Mahanta
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
Anjan Mahanta826 views
VAIBHAV JAIN WEB TECHNOLOGY.pptx von VAIBHAV481101
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV48110134 views
Html basics 1 von H K
Html basics 1Html basics 1
Html basics 1
H K962 views
LIS3353 SP12 Week 4 von Amanda Case
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
Amanda Case168 views

Más de Briana VanBuskirk

Gamification in Canvas von
Gamification in CanvasGamification in Canvas
Gamification in CanvasBriana VanBuskirk
142 views32 Folien
How to wash your hands von
How to wash your handsHow to wash your hands
How to wash your handsBriana VanBuskirk
588 views8 Folien
Magazine inspiration von
Magazine inspirationMagazine inspiration
Magazine inspirationBriana VanBuskirk
958 views21 Folien
Midterm review von
Midterm reviewMidterm review
Midterm reviewBriana VanBuskirk
668 views101 Folien
Editor's letter von
Editor's letterEditor's letter
Editor's letterBriana VanBuskirk
1K views19 Folien
Textual elements von
Textual elementsTextual elements
Textual elementsBriana VanBuskirk
2.8K views13 Folien

Último

ICS3211_lecture 09_2023.pdf von
ICS3211_lecture 09_2023.pdfICS3211_lecture 09_2023.pdf
ICS3211_lecture 09_2023.pdfVanessa Camilleri
126 views10 Folien
Recap of our Class von
Recap of our ClassRecap of our Class
Recap of our ClassCorinne Weisgerber
100 views15 Folien
The Value and Role of Media and Information Literacy in the Information Age a... von
The Value and Role of Media and Information Literacy in the Information Age a...The Value and Role of Media and Information Literacy in the Information Age a...
The Value and Role of Media and Information Literacy in the Information Age a...Naseej Academy أكاديمية نسيج
61 views42 Folien
Mineral nutrition and Fertilizer use of Cashew von
 Mineral nutrition and Fertilizer use of Cashew Mineral nutrition and Fertilizer use of Cashew
Mineral nutrition and Fertilizer use of CashewAruna Srikantha Jayawardana
52 views107 Folien
MercerJesse2.1Doc.pdf von
MercerJesse2.1Doc.pdfMercerJesse2.1Doc.pdf
MercerJesse2.1Doc.pdfjessemercerail
280 views5 Folien
unidad 3.pdf von
unidad 3.pdfunidad 3.pdf
unidad 3.pdfMarcosRodriguezUcedo
122 views38 Folien

Último(20)

ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively von PECB
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks EffectivelyISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
ISO/IEC 27001 and ISO/IEC 27005: Managing AI Risks Effectively
PECB 651 views
The basics - information, data, technology and systems.pdf von JonathanCovena1
The basics - information, data, technology and systems.pdfThe basics - information, data, technology and systems.pdf
The basics - information, data, technology and systems.pdf
JonathanCovena1156 views
BÀI TẬP BỔ TRỢ TIẾNG ANH FAMILY AND FRIENDS NATIONAL EDITION - LỚP 4 (CÓ FIL... von Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH FAMILY AND FRIENDS NATIONAL EDITION - LỚP 4 (CÓ FIL...BÀI TẬP BỔ TRỢ TIẾNG ANH FAMILY AND FRIENDS NATIONAL EDITION - LỚP 4 (CÓ FIL...
BÀI TẬP BỔ TRỢ TIẾNG ANH FAMILY AND FRIENDS NATIONAL EDITION - LỚP 4 (CÓ FIL...
EILO EXCURSION PROGRAMME 2023 von info33492
EILO EXCURSION PROGRAMME 2023EILO EXCURSION PROGRAMME 2023
EILO EXCURSION PROGRAMME 2023
info33492124 views
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant... von Ms. Pooja Bhandare
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Pharmaceutical Inorganic Chemistry Unit IVMiscellaneous compounds Expectorant...
Ms. Pooja Bhandare166 views
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx von Ms. Pooja Bhandare
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptxPharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx
Pharmaceutical Inorganic chemistry UNIT-V Radiopharmaceutical.pptx
Ms. Pooja Bhandare120 views

Html coding

  • 2. What is HTML? • Hypertext Markup Language • Using HTML, text is formatted by wrapping it in a tag. • The tags provide instructions to the browser (Safari, IE, Firefox, Chrome, etc.) for how to render the text on screen. <h2>Text wrapped in an heading level 2 tag looks like this</h2> START TAG END TAG
  • 4. 3 Parts of an HTML Document • An HTML document is divided into three sections: 1) Declarations 2) Head 3) Body 1 2 3
  • 5. Document Type • The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag. • The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.
  • 6. Starting and Ending your Code • The first tag you need is: <html> *EVERYTHING INBETWEEN </html>
  • 7. GETTING STARTED • OPEN UP NOTEPAD ON YOUR COMPUTERS • IF YOU’RE WORKING FROM A MAC DOWNLOAD TEXTWRANGLER • Start writing your code: <html> </html>
  • 8. Inside <html> </html> There are 2 sections within the <html></html>tags: • <head> </head> The head tag contains information about the page • <body> </body> Actual content displayed to the user on the web page
  • 9. Type that out in Notepad <html> <head> </head> <body> </body> </html>
  • 10. Inside <head> </head> <html> <head> <title>Title of my Page</title> </head> <body> </body> </html>
  • 11. Now Save it 1. Save as html file in a folder titled “HTML” (type “.html” at end of file name if necessary) 2. OPEN FILE in WEB BROWSER-drag file into a new tab 3. You will see the TITLE on the tab (nothing on pg. yet)
  • 12. Adding Content • Inside <body> </body> • HEADING TAGS <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
  • 13. TEST THAT OUT! <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> </body> </html>
  • 14. PARAGRAPH TAG <p><p/> <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. They are all going to understand basic coding by the end of this class.</p> </body> </html>
  • 15. Add another paragraph <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. They are all going to understand basic coding by the end of this class.</p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> </body> </html>
  • 16. Breaking up a Paragraph • </br> - another self closing tag <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is an example of a break tag that is dividing this paragraph into two lines. Do you see it?</p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> </body> </html>
  • 17. Changing Text attributes • <i></i> italics • <em></em> italics • <strong></strong> bold • <b></b> Bold • <u></u> underlined
  • 18. Adding emphasis in a paragraph <p> This is my <i>first year</i> teaching these classes. All of my students are <strong>wonderful and talented.</strong> They are all going to <em>understand</em> basic <em><u>coding</em></u> by the end of this class. </p>
  • 19. Adding a line • <hr/> - self closing tag <html> <head> <title>Title of my Page</title> </head> <body> <h1>Hello World</h1> <h2>My Name is Briana</h2> <h3>I am your teacher</h3> <p>This is my first year teaching these classes. All of my students are wonderful and talented. <br/>They are all going to understand basic coding by the end of this class. Oh, this is an example of a break tag that is dividing this paragraph into two lines. Do you see it? </p> <p>This is my second paragraph. As you can see, it is below my first paragraph.</p> <hr/> <img src="http://uhaweb.hartford.edu/aschmidt/kitten11.jpg"/> </body> </html>
  • 20. Creating Bulleted Lists • To create a bullet pointed list we will use an unordered list <ul></ul> • The whole list is wrapped in UL tags and then all of the elements in the list are wrapped in <li></li> tags <html> <head> <title>Title of my Page</title> </head> <body> <ul> <li>Item 1</li> <li>Item 2</li> </ul> </body> </html>
  • 21. Creating Numbered Lists • Instead of <ul></ul> you will use <ol></ol> • The whole list is wrapped in OL tags and then all of the elements in the list are wrapped in <li></li> tags <html> <head> <title>Title of my Page</title> </head> <body> <ol> <li>Item 1</li> <li>Item 2</li> </ol> </body> </html>
  • 22. Creating Definition Lists • <dl></dl> • The whole list is wrapped in dl tags and then all of the elements in the list are wrapped in either <dt></dt> or <dd></dd> <html> <head> <title>Title of my Page</title> </head> <body> <dl> <dt>term1</dt> <dd>definition 1</dd> <dt>term2</dt> <dd>definition 2</dd> </dl> </body> </html>
  • 23. Adding an IMAGE • Find an image on Google • Click on it • Click View Image (so the image is on it’s own page) • Copy the URL • Now we will add it to our code
  • 24. Inserting Image from Web <img src=“INSERTLINKHERE”/> Resize the image (below) <img src=“LINK” alt=“displaytext” style=“width: #; #;”>
  • 25. Adding Image from Folder • Create a file in your HTML folder titled IMAGES • Save an image in the Images folder • <img src=”images/TitleOfYourImage.jpg" alt=”NameYourImage" style="width:#px; height:#px”/>
  • 26. Add a video from Youtube Get the embed code from YOUTUBE <iframe width=”#" height=”#" src=“YOUTUBE LINK HERE" frameborder="0" allowfullscreen></iframe>
  • 28. Open link in new tab <a href="http://facebook.com" target="_blank">Click Here<a/>
  • 29. Links from Icons <a href=”WEBSITELINK"> <img src=”ICON"alt="Youtube Link" width=”#" height=”#"></a>
  • 30. HTML Text Color <h1 style=“color:blue;”>This is a heading</h1> <p style="color:red;">This is a paragraph.</p>
  • 31. Change Background color to a line of text
  • 32. The <span> Element • The <span> element is often used as a container for some text. • The <span> element has no required attributes, but both style and class are common. • When used together with CSS, the <span> element can be used to style parts of the text:
  • 33. The <span> Element <!DOCTYPE html> <html> <body> <h1>My <span style="color:red">Important</span> Heading</h1> </body> </html>
  • 34. HTML Fonts <h1 style="font-family:verdana;">This is a heading</h1> <p style="font-family:courier;">This is a paragraph.</p>
  • 35. HTML Text Size <h1 style="font-size:300%;">This is a heading</h1> <p style="font-size:160%;">This is a paragraph.</p>v
  • 36. HTML Text Alignment <h1 style="text-align:center;">Centered Heading</h1> <p style="text-align:center;">Centered paragraph.</p>
  • 37. HTML Background Color • <!DOCTYPE html> • <html> • <body style="background-color:powderblue;"> • <h1>This is a heading</h1> • <p>This is a paragraph.</p> • </body> • </html>
  • 38. HTML Background Image from File • YOU MUST HAVE YOUR FILE SAVES AS INDEX.HTML <html> <head> <title>Title of my Page</title> <body background = ”images/watercolor.jpg"> *everything else </body> </html>
  • 39. CSS • CSS stands for Cascading Style Sheets. • CSS describes how HTML elements are to be displayed on screen, paper, or in other media. • CSS saves a lot of work. It can control the layout of multiple web pages all at once. CSS can be added to HTML elements in 3 ways: • Inline - by using the style attribute in HTML elements • Internal - by using a <style> element in the <head> section • External - by using an external CSS file
  • 40. Inline CSS • <h1 style="color:blue;">This is a Blue Heading</h1>
  • 41. Internal CSS • An internal CSS is used to define a style for a single HTML page. • An internal CSS is defined in the <head> section of an HTML page, within a <style> element: <html> <head> <style> body {background-color: powderblue;} h1 {color: blue;} p {color: red;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 42. CSS Background Image from Link <html> <head> <title>Title of my Page</title> <style> body { background-image: url(”LINKHERE"); } </style> </head> <body>
  • 43. CSS Border <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 44. CSS Padding <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; padding: 30px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 45. CSS Margin <!DOCTYPE html> <html> <head> <style> p { border: 1px solid powderblue; margin: 50px; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 46. CSS id Attribute <!DOCTYPE html> <html> <head> <style> #p01 { color: blue; } </style> </head> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p id="p01">I am different.</p> </body> </html>
  • 47. CSS Class Attribute <!DOCTYPE html> <html> <head> <style> p.different { color: red; } </style> </head> <body> <p>This is a paragraph.</p> <p>This is a paragraph.</p> <p class=”different">I am different.</p> <p>This is a paragraph.</p> <p class=”different">I am different too.</p> </body> </html>
  • 48. The <div> Element • The <div> element is often used as a container for other HTML elements. • The <div> element has no required attributes, but both style and class are common. • When used together with CSS, the <div> element can be used to style blocks of content:
  • 49. The <div> Element <!DOCTYPE html> <html> <body> <p>This is some text.</p> <div style="color:#0000FF"> <h3>This is a heading in a div element</h3> <p>This is some text in a div element.</p> </div> <p>This is some text.</p> </body> </html>
  • 50. The <div> Element <!DOCTYPE html> <html> <body> <div style="background- color:black;color:white;padding:20px;"> <h2>London</h2> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </div> </body> </html>
  • 51. <!DOCTYPE html> <html> <head> <style> div.cities { background-color: black; color: white; margin: 20px 0 20px 0; padding: 20px; } </style> </head> <body> <div class="cities"> <h2>London</h2> <p>London is the capital of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </div> <div class="cities"> <h2>Paris</h2> <p>Paris is the capital and most populous city of France.</p> <p>Situated on the Seine River, it is at the heart of the Île-de-France region, also known as the région parisienne.</p> <p>Within its metropolitan area is one of the largest population centers in Europe, with over 12 million inhabitants.</p> </div>
  • 53. EXAMPLE (inside <head> tag) nav ul { list-style-type: none; padding: 0; } nav ul a { text-decoration: none; } article { margin-left: 170px; border-left: 1px solid gray; padding: 1em; overflow: hidden; } </style> </head> <!DOCTYPE html> <html> <head> <style> div.container { width: 100%; border: 1px solid gray; } header, footer { padding: 1em; color: white; background-color: black; clear: left; text-align: center; } nav { float: left; max-width: 160px; margin: 0; padding: 1em; }
  • 54. Example (inside <body>) <article> <h1>London</h1> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </article> <footer>Copyright &copy; W3Schools.com</footer> </div> </body> </html> <body> <div class="container"> <header> <h1>City Gallery</h1> </header> <nav> <ul> <li>London</li> <li>Paris</li> <li>Tokyo</li> </ul> </nav>
  • 56. See what you can come up with!