SlideShare a Scribd company logo
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
 ActiveState
Komodo
 Alleycode HTML
Editor
 Aptana
 Arachnophilia
 Atom
 BBEdit
 BlueFish
 Brackets
 Coda
 Codelobster
 CoffeeCup HTML
Editor
 NoteTab
 PHPEdit
 PhpStorm IDE
 E Text Editor
 Eclipse
 EditPlus
 Emacs
 EmEditor
 Geany
 HTML-Kit
 HomeSite
 Notepad++
 NetBeans IDE
 Programmer's
Notepad
 PSPad
 RJ TextEd
 SciTE
 Smultron
 Sublime Text
 skEdit
 TED Notepad
 TextMate
 TextPad
 TextWrangler
 Tincta
 TopStyle
 UltraEdit
 Vim
 Web Architect
 WebStorm
HTML Editors
HTML Attributes
Below is an alphabetical list of some
attributes often used in HTML.
Attribute Description
alt Specifies an alternative text for an image
disabled Specifies that an input element should be disabled
href Specifies the URL (web address) for a link
id Specifies a unique id for an element
src Specifies the URL (web address) for an image
style Specifies an inline CSS style for an element
title Specifies extra information about an element (displayed as a tool
tip)
value Specifies the value (text content) for an input element.
HTML Headings
Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the
least important heading.
Example
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
HTML Horizontal Rules
The <hr> tag creates a horizontal line in
an HTML page.
The hr element can be used to separate
content:
Example
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
The HTML <head> Element
The HTML <head> element has nothing to
do with HTML headings.
The HTML <head> element contains meta
data. Meta data are not displayed.
The HTML <head> element is placed
between the <html> tag and the <body>
tag:
Example
<!DOCTYPE html>
<html>
<head>
<title>My First HTML</title>
<meta charset="UTF-8">
</head>
<body>
The HTML <title> Element
The HTML <title> element is meta data. It
defines the HTML document's title.
The title will not be displayed in the
document, but might be displayed in the
browser tab.
The HTML <meta> Element
The HTML <meta> element is also meta data.
It can be used to define the character set, and other information
about the HTML document.
More Meta Elements
In the chapter about HTML styles you discover more meta elements:
The HTML <style> element is used to define internal CSS style
sheets.
The HTML <link> element is used to define external CSS style sheets.
The <meta> tag provides metadata about the HTML document. Metadata
will not be displayed on the page, but will be machine parsable.
Meta elements are typically used to specify page description, keywords,
author of the document, last modified, and other metadata.
The metadata can be used by browsers (how to display content or reload
page), search engines (keywords), or other web services.
HTML Tag Reference
W3Schools' tag reference contains additional information about these tags
and their attributes.
You will learn more about HTML tags and attributes in the next chapters of
this tutorial.
Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<head> Defines the document's head
element
<h1> to <h6> Defines HTML headings
<hr> Defines a horizontal line
HTML Paragraphs
The HTML <p> element defines a paragraph.
Example
<p>This is a paragraph</p>
<p>This is another paragraph</p>
HTML Line Breaks
The HTML <br> element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
The HTML <pre> Element
The HTML <pre> element defines preformatted text.
The text inside a <pre> element is displayed in a fixed-width font (usually Courier),
and it preserves both spaces and line breaks:
Example
<pre>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</pre>
HTML Styling
Every HTML element has a default style (background color is white and text color is
black).
Changing the default style of an HTML element, can be done with the style
attribute.
This example changes the default background color from white to lightgrey:
Example
<body style="background-color:lightgrey">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
HTML Fonts
The font-family property defines the font to be used for an HTML element:
Example
<h1 style="font-family:verdana">This is a heading</h1>
<p style="font-family:courier">This is a paragraph.</p>
HTML Text Size
The font-size property defines the text size to be used for an HTML element:
Example
<h1 style="font-size:300%">This is a heading</h1>
<p style="font-size:160%">This is a paragraph.</p>
HTML Text Alignment
The text-align property defines the horizontal text alignment for an HTML element:
Example
<h1 style="text-align:center">Centered Heading</h1>
<p>This is a paragraph.</p>
HTML Text Formatting Elements
HTML Bold and Strong Formatting
The HTML <b> element defines bold text, without any extra importance.
Example
<p>This text is normal.</p>
<p><b>This text is bold</b>.</p>
The HTML <strong> element defines strong text, with added semantic "strong"
importance.
Example
<p>This text is normal.</p>
<p><strong>This text is strong</strong>.</p>
The HTML <i> element defines italic text, without any extra importance.
Example
<p>This text is normal.</p>
<p><i>This text is italic</i>.</p>
The HTML <em> element defines emphasized text, with added semantic importance.
Example
<p>This text is normal.</p>
<p><em>This text is emphasized</em>.</p>
The HTML <small> element defines small text:
Example
<h2>HTML <small>Small</small> Formatting</h2>
The HTML <mark> element defines marked or highlighted text:
Example
<h2>HTML <mark>Marked</mark> Formatting</h2>
The HTML <del> element defines deleted (removed) of text.
Example
<p>My favorite color is <del>blue</del> red.</p>
The HTML <ins> element defines inserted (added) text.
Example
<p>My favorite <ins>color</ins> is red.</p>
The HTML <sub> element defines subscripted text.
Example
<p>This is <sub>subscripted</sub> text.</p>

More Related Content

What's hot

Crash Course Web - HTML Presentation
Crash Course Web - HTML PresentationCrash Course Web - HTML Presentation
Crash Course Web - HTML Presentation
John Paul Ada
 
Html presentation
Html presentationHtml presentation
Html presentation
Prashanthi Mamidisetty
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
Richa Singh
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
NextGenr
 
Html
HtmlHtml
Html.docx
Html.docxHtml.docx
Html.docx
Noman Ali
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
Tushar Rajput
 
HTML
HTMLHTML
Html training slide
Html training slideHtml training slide
Html training slide
villupuramtraining
 
Elements of html powerpoint
Elements of html powerpointElements of html powerpoint
Elements of html powerpoint
Anastasia1993
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
eShikshak
 
Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
Sara Corpuz
 
HTML
HTMLHTML
HTML
Kalpana T
 
HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2
Sharon Wasden
 
Html tables
Html tablesHtml tables
Html tables
Himanshu Pathak
 
Html full
Html fullHtml full
Html full
GulshanKumar368
 
Creating your 1st html page
Creating your 1st html pageCreating your 1st html page
Creating your 1st html page
Sara Corpuz
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
satvirsandhu9
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Sanjeev Kumar
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
Hameda Hurmat
 

What's hot (20)

Crash Course Web - HTML Presentation
Crash Course Web - HTML PresentationCrash Course Web - HTML Presentation
Crash Course Web - HTML Presentation
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Html Basic Tags
Html Basic TagsHtml Basic Tags
Html Basic Tags
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
Html
HtmlHtml
Html
 
Html.docx
Html.docxHtml.docx
Html.docx
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
HTML
HTMLHTML
HTML
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Elements of html powerpoint
Elements of html powerpointElements of html powerpoint
Elements of html powerpoint
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
 
HTML
HTMLHTML
HTML
 
HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2HTML Lecture Part 1 of 2
HTML Lecture Part 1 of 2
 
Html tables
Html tablesHtml tables
Html tables
 
Html full
Html fullHtml full
Html full
 
Creating your 1st html page
Creating your 1st html pageCreating your 1st html page
Creating your 1st html page
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 

Similar to Html basics

Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
 
HTML 5 Topic 2
HTML 5 Topic 2HTML 5 Topic 2
HTML 5 Topic 2
Juvywen
 
Computer application html
Computer application htmlComputer application html
Computer application html
PrashantChahal3
 
Html
HtmlHtml
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
vethics
 
Html
HtmlHtml
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
People Strategists
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
Ahmad Al-ammar
 
HTML Training Part1
HTML Training Part1HTML Training Part1
HTML Training Part1
than sare
 
INTRODUCTION FOR HTML
INTRODUCTION  FOR HTML INTRODUCTION  FOR HTML
INTRODUCTION FOR HTML
Rahul Bathri
 
Html2
Html2Html2
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
html
htmlhtml
html
tumetr1
 
Html notes
Html notesHtml notes
Html notes
Ismail Mukiibi
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
ShwetaAggarwal56
 
Html
HtmlHtml
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
BagHarki
 
Html
HtmlHtml
Html
HtmlHtml

Similar to Html basics (20)

Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
HTML 5 Topic 2
HTML 5 Topic 2HTML 5 Topic 2
HTML 5 Topic 2
 
Computer application html
Computer application htmlComputer application html
Computer application html
 
Html
HtmlHtml
Html
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
Html
HtmlHtml
Html
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
 
HTML Training Part1
HTML Training Part1HTML Training Part1
HTML Training Part1
 
INTRODUCTION FOR HTML
INTRODUCTION  FOR HTML INTRODUCTION  FOR HTML
INTRODUCTION FOR HTML
 
Html2
Html2Html2
Html2
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
HTML - LinkedIn
 
html
htmlhtml
html
 
Html notes
Html notesHtml notes
Html notes
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
 
Html
HtmlHtml
Html
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 

Recently uploaded

Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 

Html basics

  • 1.
  • 2. <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
  • 3.  ActiveState Komodo  Alleycode HTML Editor  Aptana  Arachnophilia  Atom  BBEdit  BlueFish  Brackets  Coda  Codelobster  CoffeeCup HTML Editor  NoteTab  PHPEdit  PhpStorm IDE  E Text Editor  Eclipse  EditPlus  Emacs  EmEditor  Geany  HTML-Kit  HomeSite  Notepad++  NetBeans IDE  Programmer's Notepad  PSPad  RJ TextEd  SciTE  Smultron  Sublime Text  skEdit  TED Notepad  TextMate  TextPad  TextWrangler  Tincta  TopStyle  UltraEdit  Vim  Web Architect  WebStorm HTML Editors
  • 4. HTML Attributes Below is an alphabetical list of some attributes often used in HTML. Attribute Description alt Specifies an alternative text for an image disabled Specifies that an input element should be disabled href Specifies the URL (web address) for a link id Specifies a unique id for an element src Specifies the URL (web address) for an image style Specifies an inline CSS style for an element title Specifies extra information about an element (displayed as a tool tip) value Specifies the value (text content) for an input element.
  • 5. HTML Headings Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3> HTML Horizontal Rules The <hr> tag creates a horizontal line in an HTML page. The hr element can be used to separate content: Example <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p>
  • 6. The HTML <head> Element The HTML <head> element has nothing to do with HTML headings. The HTML <head> element contains meta data. Meta data are not displayed. The HTML <head> element is placed between the <html> tag and the <body> tag: Example <!DOCTYPE html> <html> <head> <title>My First HTML</title> <meta charset="UTF-8"> </head> <body>
  • 7. The HTML <title> Element The HTML <title> element is meta data. It defines the HTML document's title. The title will not be displayed in the document, but might be displayed in the browser tab.
  • 8. The HTML <meta> Element The HTML <meta> element is also meta data. It can be used to define the character set, and other information about the HTML document. More Meta Elements In the chapter about HTML styles you discover more meta elements: The HTML <style> element is used to define internal CSS style sheets. The HTML <link> element is used to define external CSS style sheets. The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable. Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata. The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services.
  • 9. HTML Tag Reference W3Schools' tag reference contains additional information about these tags and their attributes. You will learn more about HTML tags and attributes in the next chapters of this tutorial. Tag Description <html> Defines an HTML document <body> Defines the document's body <head> Defines the document's head element <h1> to <h6> Defines HTML headings <hr> Defines a horizontal line
  • 10. HTML Paragraphs The HTML <p> element defines a paragraph. Example <p>This is a paragraph</p> <p>This is another paragraph</p> HTML Line Breaks The HTML <br> element defines a line break. Use <br> if you want a line break (a new line) without starting a new paragraph: The HTML <pre> Element The HTML <pre> element defines preformatted text. The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks: Example <pre> My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me. </pre>
  • 11. HTML Styling Every HTML element has a default style (background color is white and text color is black). Changing the default style of an HTML element, can be done with the style attribute. This example changes the default background color from white to lightgrey: Example <body style="background-color:lightgrey"> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body>
  • 12. HTML Fonts The font-family property defines the font to be used for an HTML element: Example <h1 style="font-family:verdana">This is a heading</h1> <p style="font-family:courier">This is a paragraph.</p> HTML Text Size The font-size property defines the text size to be used for an HTML element: Example <h1 style="font-size:300%">This is a heading</h1> <p style="font-size:160%">This is a paragraph.</p> HTML Text Alignment The text-align property defines the horizontal text alignment for an HTML element: Example <h1 style="text-align:center">Centered Heading</h1> <p>This is a paragraph.</p>
  • 13. HTML Text Formatting Elements HTML Bold and Strong Formatting The HTML <b> element defines bold text, without any extra importance. Example <p>This text is normal.</p> <p><b>This text is bold</b>.</p> The HTML <strong> element defines strong text, with added semantic "strong" importance. Example <p>This text is normal.</p> <p><strong>This text is strong</strong>.</p> The HTML <i> element defines italic text, without any extra importance. Example <p>This text is normal.</p> <p><i>This text is italic</i>.</p> The HTML <em> element defines emphasized text, with added semantic importance. Example <p>This text is normal.</p> <p><em>This text is emphasized</em>.</p>
  • 14. The HTML <small> element defines small text: Example <h2>HTML <small>Small</small> Formatting</h2> The HTML <mark> element defines marked or highlighted text: Example <h2>HTML <mark>Marked</mark> Formatting</h2> The HTML <del> element defines deleted (removed) of text. Example <p>My favorite color is <del>blue</del> red.</p> The HTML <ins> element defines inserted (added) text. Example <p>My favorite <ins>color</ins> is red.</p> The HTML <sub> element defines subscripted text. Example <p>This is <sub>subscripted</sub> text.</p>