SlideShare a Scribd company logo
1 of 31
What is LaTeX?
• LaTeX is pronounced “lay-tech” or “lah-tech,”
not “la-teks.”
What is LaTeX?
• LaTeX is a document markup language used to
create documents in TeX.
• LATEX is the standard mathematical
typesetting program
• A computer language that consists of easily
understood keywords, names, or tags that
help format the overall view of a page and the
data it contains.
• Some examples of a markup
language are HTML and XML.
Typesetting can be defined as the process
of preparing and arranging text and
images for printing
Latex was created by the American computer scientist named
Leslie Lamport in 1983
Why Use LaTeX?
• Mathematical symbols and equations are easily integrated.
• Even complex structures such as footnotes, references, table
of contents, and bibliographies can be generated easily.
• Creates more beautiful documents.
• Portable, compatible, flexible, and cheap (or free)!
Images from Dario Taraborelli’s
Blog
Markup versus WYSIWYG
To someone familiar with MS Word /Open Office Writer ….Latex is that you do not
interact with a graphical user interface (GUI), and you do not immediately see how
your document will be typeset.
Consider a typical WYSIWYG ("what you see is what you get") word processor, such
as Open Office Writer, shown in the screenshot below:
• https://www.ieee.org/conferences/publishing
/templates.html
Installing LaTeX
• In Windows
• MiKTeX
– MiKTeX is a typesetting system for the Windows.
– Download from www.miktex.org for free
– It is generally recommended to install MiKTeX first,
then WinEdt.
• WinEdt
– WinEdt is a text editor.
– WinEdt creates the source file (.tex and others).
– Download from www.winedt.com for free for 30 days.
– WinEdt costs $30.
Installing LaTeX
• Other text editors
– There are other text editors.
– Winshell for free (http://www.winshell.de/)
– Scientific Workplace
• Combination of LaTeX and Mathematics program
• Does a good job of calculating and graphing, very user friendly, but
expensive
• In Mac
• TexShop
– Download for free
http://www.uoregon.edu/~koch/texshop/
– Includes everything!
https://www.overleaf.com/
Source code of your
first LaTeX document
(test.tex)
documentclass{article}
begin{document}
This is my first Latex
end{document}
documentclass{article}, declares the
document type known as its class, which
controls the overall appearance of the
document.
begin{document} and end{document},
Body of the document, is written between the
begin and end tags.
Font Size: The point size can be described in the way [10pt]. The
other font sizes are 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt.
The default font size for Latex is 10pt.
The paper types with their dimensions are given below:
o letterpaper (11 x 8.5 in)
o legalpaper (14 x 8.5 in)
o a5paper (5.8 x 8.3 in)
o a4paper (8.3 x 11.7 in)
o executivepaper (10.5 x 7.25 in)
o b5paper (25 x 17.6 cm)
Command Type Size
{tiny} size text
{scriptsize} size text
{footnotesize} size text
{small} size text
{normalsize} size text
{large} size text
{Large} size text
{LARGE} size text
{huge} size text
Font Styles:
Style Command
Roman textrm{roman}
Typewriter texttt{typewriter}
Sans serif textsf{sans serif}
Style Command
boldface textbf{boldface}
medium textmd{medium}
italic textit{italic}
slanted textsl{slanted}
upright textup{upright}
SMALL CAP textsc{small cap}
documentclass[12pt]{article}
begin{document}
textit{textbf{ Latex}}
textrm{textsl{ IT Workshop}}
end{document}
The basic requirements to insert an image are:
o Including the graphicx package. The command will be written
as usepackage{graphicx}.
o You need to download the particular image from the browser and save that image
in the same folder where the Latex files are present.
o Example:
documentclass[12pt]{article}
usepackage{graphicx}
begin{document}
includegraphics{computer.jpg}
end{document}
documentclass{article}
usepackage{graphicx}
begin{document}
begin{figure}
includegraphics {boat.jpg}
caption{A boat.}
end{figure}
end{document}
documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{equation}
x + y = 4 % there should be no gap between any of the two
rows
end{equation}
end{document}
documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{equation}
x^2 +2x+ 6 = 0
end{equation}
end{document}
documentclass[12pt]{article}
usepackage{mathtools}
begin{document}
begin{equation}
1, 2, 3, 4, 5, 6........... infty
end{equation}
end{document}
documentclass[12pt]{standalone}
usepackage{pgfplots}
pgfplotsset{width=6.6cm,compat=1.7}
begin{document}
begin{tikzpicture}
begin{axis}
[
ybar,
enlargelimits=0.15,
ylabel={#Average Marks}, % the ylabel must precede a # symbol.
xlabel={ Students Name},
symbolic x coords={Tom, Jack, Hary, Liza, Henry}, % these are the specification of
coordinates on the x-axis.
xtick=data,
nodes near coords, % this command is used to mention the y-axis points on the top
of the particular bar.
nodes near coords align={vertical},
]
addplot coordinates {(Tom,50) (Jack,90) (Hary,70) (Liza,80) (Henry,60) };
end{axis}
end{tikzpicture}
end{document}
Three Ways to Insert CSS
•External CSS
•Internal CSS
•Inline CSS
Inline CSS
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;text-align:center;">This
is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
</body>
</html>
An inline style may be used to apply a unique style for a
single element.
Internal CSS
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: blue;
}
h1 {
color: maroon;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
An internal style sheet may be used if
one single HTML page
External CSS
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="my
style.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
mystyle.css
body {
background-
color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
With an external style sheet, you can change the look of an entire
website by changing just one file!
Each HTML page must include a reference to the external style sheet file
inside the <link> element, inside the head section.

More Related Content

Similar to latex document for IT workshop Lab . B.Tech

LaTeX로 문서 작성하자
LaTeX로 문서 작성하자LaTeX로 문서 작성하자
LaTeX로 문서 작성하자Kangjun Heo
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late xC-CORE
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with TexstudioHossein Babashah
 
Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLEabigail4894
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptMichalis33
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. AlrshahAbdulazim N.Elaati
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEXAnusha Vajrapu
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latextran dinh
 
Latex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.pptLatex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.pptLadallaRajKumar
 

Similar to latex document for IT workshop Lab . B.Tech (20)

LaTeX Survival Guide
LaTeX Survival Guide LaTeX Survival Guide
LaTeX Survival Guide
 
Inroduction to Latex
Inroduction to LatexInroduction to Latex
Inroduction to Latex
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
LaTeX로 문서 작성하자
LaTeX로 문서 작성하자LaTeX로 문서 작성하자
LaTeX로 문서 작성하자
 
Introduction to LaTeX
Introduction to LaTeXIntroduction to LaTeX
Introduction to LaTeX
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
14 Late X
14 Late X14 Late X
14 Late X
 
Installation guide for Latex and MOODLE
Installation guide for Latex and MOODLEInstallation guide for Latex and MOODLE
Installation guide for Latex and MOODLE
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.ppt
 
Introduction to Latex
Introduction to LatexIntroduction to Latex
Introduction to Latex
 
latex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshahlatex-workshop Dr: Mohamed A. Alrshah
latex-workshop Dr: Mohamed A. Alrshah
 
documents writing with LATEX
documents writing with LATEXdocuments writing with LATEX
documents writing with LATEX
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Head first latex
Head first latexHead first latex
Head first latex
 
Link. LaTeX
  Link. LaTeX  Link. LaTeX
Link. LaTeX
 
Latex
LatexLatex
Latex
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latex
 
Words in Code
Words in CodeWords in Code
Words in Code
 
Latex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.pptLatex - Companion for a Researcher - A Review.ppt
Latex - Companion for a Researcher - A Review.ppt
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 

latex document for IT workshop Lab . B.Tech

  • 1. What is LaTeX? • LaTeX is pronounced “lay-tech” or “lah-tech,” not “la-teks.”
  • 2. What is LaTeX? • LaTeX is a document markup language used to create documents in TeX. • LATEX is the standard mathematical typesetting program
  • 3. • A computer language that consists of easily understood keywords, names, or tags that help format the overall view of a page and the data it contains. • Some examples of a markup language are HTML and XML. Typesetting can be defined as the process of preparing and arranging text and images for printing
  • 4. Latex was created by the American computer scientist named Leslie Lamport in 1983
  • 5. Why Use LaTeX? • Mathematical symbols and equations are easily integrated. • Even complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily. • Creates more beautiful documents. • Portable, compatible, flexible, and cheap (or free)! Images from Dario Taraborelli’s Blog
  • 6.
  • 7. Markup versus WYSIWYG To someone familiar with MS Word /Open Office Writer ….Latex is that you do not interact with a graphical user interface (GUI), and you do not immediately see how your document will be typeset. Consider a typical WYSIWYG ("what you see is what you get") word processor, such as Open Office Writer, shown in the screenshot below:
  • 9. Installing LaTeX • In Windows • MiKTeX – MiKTeX is a typesetting system for the Windows. – Download from www.miktex.org for free – It is generally recommended to install MiKTeX first, then WinEdt. • WinEdt – WinEdt is a text editor. – WinEdt creates the source file (.tex and others). – Download from www.winedt.com for free for 30 days. – WinEdt costs $30.
  • 10. Installing LaTeX • Other text editors – There are other text editors. – Winshell for free (http://www.winshell.de/) – Scientific Workplace • Combination of LaTeX and Mathematics program • Does a good job of calculating and graphing, very user friendly, but expensive • In Mac • TexShop – Download for free http://www.uoregon.edu/~koch/texshop/ – Includes everything! https://www.overleaf.com/
  • 11. Source code of your first LaTeX document (test.tex) documentclass{article} begin{document} This is my first Latex end{document}
  • 12. documentclass{article}, declares the document type known as its class, which controls the overall appearance of the document. begin{document} and end{document}, Body of the document, is written between the begin and end tags.
  • 13. Font Size: The point size can be described in the way [10pt]. The other font sizes are 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, 20pt. The default font size for Latex is 10pt. The paper types with their dimensions are given below: o letterpaper (11 x 8.5 in) o legalpaper (14 x 8.5 in) o a5paper (5.8 x 8.3 in) o a4paper (8.3 x 11.7 in) o executivepaper (10.5 x 7.25 in) o b5paper (25 x 17.6 cm)
  • 14. Command Type Size {tiny} size text {scriptsize} size text {footnotesize} size text {small} size text {normalsize} size text {large} size text {Large} size text {LARGE} size text {huge} size text
  • 15. Font Styles: Style Command Roman textrm{roman} Typewriter texttt{typewriter} Sans serif textsf{sans serif} Style Command boldface textbf{boldface} medium textmd{medium} italic textit{italic} slanted textsl{slanted} upright textup{upright} SMALL CAP textsc{small cap}
  • 16.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. The basic requirements to insert an image are: o Including the graphicx package. The command will be written as usepackage{graphicx}. o You need to download the particular image from the browser and save that image in the same folder where the Latex files are present. o Example: documentclass[12pt]{article} usepackage{graphicx} begin{document} includegraphics{computer.jpg} end{document}
  • 24. documentclass[12pt]{article} usepackage{mathtools} begin{document} begin{equation} x + y = 4 % there should be no gap between any of the two rows end{equation} end{document}
  • 27. documentclass[12pt]{standalone} usepackage{pgfplots} pgfplotsset{width=6.6cm,compat=1.7} begin{document} begin{tikzpicture} begin{axis} [ ybar, enlargelimits=0.15, ylabel={#Average Marks}, % the ylabel must precede a # symbol. xlabel={ Students Name}, symbolic x coords={Tom, Jack, Hary, Liza, Henry}, % these are the specification of coordinates on the x-axis. xtick=data, nodes near coords, % this command is used to mention the y-axis points on the top of the particular bar. nodes near coords align={vertical}, ] addplot coordinates {(Tom,50) (Jack,90) (Hary,70) (Liza,80) (Henry,60) }; end{axis} end{tikzpicture} end{document}
  • 28. Three Ways to Insert CSS •External CSS •Internal CSS •Inline CSS
  • 29. Inline CSS <!DOCTYPE html> <html> <body> <h1 style="color:blue;text-align:center;">This is a heading</h1> <p style="color:red;">This is a paragraph.</p> </body> </html> An inline style may be used to apply a unique style for a single element.
  • 30. Internal CSS <!DOCTYPE html> <html> <head> <style> body { background-color: blue; } h1 { color: maroon; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> An internal style sheet may be used if one single HTML page
  • 31. External CSS <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="my style.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> mystyle.css body { background- color: lightblue; } h1 { color: navy; margin-left: 20px; } With an external style sheet, you can change the look of an entire website by changing just one file! Each HTML page must include a reference to the external style sheet file inside the <link> element, inside the head section.