SlideShare a Scribd company logo
What is HTML?
 HTML is short for "Hyper Text Markup Language".
 It simply means it is a language for describing web-pages using
ordinary text.
 All HTML documents must start with a type declaration: <!DOCTYPE
html>.
 The HTML document itself begins with <html> and ends with </html>.
 The visible part of the HTML document is
between <body> and </body>.
HTML tag
• Every web page is actually a HTML file.
• Each HTML file is just a plain-text file, but with
a .html file extension instead of .txt, and is made up of
many HTML tags as well as the content for a web
page.
A web site will often contain many html files that link to
each other. You can edit HTML files with your
favorite editor. Like Adobe Dreamweaver, Microsoft
Expression Web, Coffee Cup HTML Editor
HTML Files
HTML Tags
 HTML tags are the hidden keywords within a web page that define how the
browser must format and display the content.
 Most tags must have two parts, an opening and a closing part.
 For example, <html> is the opening tag and </html> is the closing tag. Note that
the closing tag has the same text as the opening tag, but has an additional
forward-slash ( / ) character.
 The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML
documents and display them.
 The browser does not display the HTML tags, but uses them to determine how to
display the document:
 The DOCTYPE declaration defines the document type to be HTML
 The text between <html> and </html> describes an HTML
document
 The text between <head> and </head> provides information about
the document
 The text between <title> and </title> provides a title for the
document
 The text between <body> and </body> describes the visible page
content
 The text between <h1> and </h1> describes a heading
 The text between <p> and </p> describes a paragraph
HTML Elements
• An HTML element is defined by a starting tag. If the element
contains other content, it ends with a closing tag, where the
element name is preceded by a forward slash as shown below
with few tags:
Start Tag Content End Tag
<p> This is paragraph content. </p>
<h1> This is heading content. </h1>
<div> This is division content. </div>
<br />
• Here <p>....</p> is an HTML element, <h1>...</h1> is another HTML
element.
• There are some HTML elements which don't need to be closed, such as
<img.../>, <hr /> and <br /> elements.
• These are known as void elements.
• HTML documents consist of a tree of these elements and they specify
how HTML documents should be built, and what kind of content should
be placed in what part of an HTML document.
• An HTML element is defined by a starting tag. If the element contains
other content, it ends with a closing tag.
• For example <p> is starting tag of a paragraph and </p> is closing tag of
the same paragraph but <p>This is paragraph</p> is a paragraph
element
HTML Attributes
 An attribute is used to define the characteristics of an HTML element and is
placed inside the element's opening tag. All attributes are made up of two parts:
a name and a value.
 The name is the property you want to set. For example, the paragraph <p>
element in the example carries an attribute whose name is align, which you can
use to indicate the alignment of paragraph on the page.
 The value is what you want the value of the property to be set and always put
within quotations. The below example shows three possible values of align
attribute: left, center and right.
Result
Core Attributes
The four core attributes that can be used on the majority of HTML elements are:
 Id
 Title
 Class
 style
The id Attribute
 The id attribute of an HTML tag can be used to uniquely identify any element
within an HTML page. There are two primary reasons that you might want to
use an id attribute on an element:
 If an element carries an id attribute as a unique identifier it is possible to
identify just that element and its content.
 If you have two elements of the same name within a Web page (or style
sheet), you can use the id attribute to distinguish between elements that have
the same name.
 Example:
<p id="html">This para explains what is HTML</p>
<p id="css">This para explains what is Cascading Style Sheet</p>
The title Attribute
• The title attribute gives a suggested title for the element. They syntax for
the title attribute is similar as explained for id attribute:
• Example
<!DOCTYPE html>
<html>
<head>
<title>The title Attribute Example</title>
</head>
<body>
<h3 title="Hello HTML!">Titled Heading Tag Example</h3>
</body>
</html>
The class Attribute
• The class attribute is used to associate an element with a style
sheet, and specifies the class of element.
• Example:
class="className1 className2 className3"
The style Attribute
• The style attribute allows you to specify Casecading Style Sheet (CSS) rules
within the element.
• Example:
<!DOCTYPE html>
<html>
<head>
<title>The style Attribute</title>
</head>
<body>
<p style="font-family:arial; color:#FF0000;">Some text...</p>
</body>
</html>
HTML Headings
• Headings are defined with the <h1> to <h6> tags.
• <h1> defines the most important heading. <h6> defines the least important
heading.
Example:
<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>
<hr> tag
 The <hr> tag creates a horizontal line in an HTML page.
 The hr element can be used to separate content:
 Example:
<!DOCTYPE html>
<html>
<body>
<p>The hr tag defines a horizontal rule:</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
</body>
</html>
HTML Paragraphs
• <p> </p> element
• The HTML <p> element defines a paragraph.
• In HTML You cannot be sure how HTML will be displayed.
• Large or small screens, and resized windows will create different results.
• With HTML, you cannot change the output by adding extra spaces or extra lines
in your HTML code.
• The browser will remove extra spaces and extra lines when the page is
displayed.
• Any number of spaces, and any number of new lines, count as only one
space.
Example:
<!DOCTYPE html>
<html>
<body>
<p>
This paragraph
contains a lot
of lines.
it also contains lots
of space.
</p>
</body>
</html>
• <br> element
• 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 <br> element is an empty HTML element. It has no end tag.
• Example :
<!DOCTYPE html>
<html>
<body>
<p>This is<br>a para<br>graph with<br> line breaks</p>
</body>
</html>
• <pre> element
• The HTML <pre> element defines preformatted text.
• The text inside a <pre> element is displayed in a fixed-width font.
• It is used for poem writing.
• Example:
<!DOCTYPE html>
<html>
<body>
<p>The pre tag preserves both spaces and line breaks:</p>
<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>
</body>
</html>
HTML Styles
• 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.
• The HTML style attribute has the following syntax:
style="property:value“
• Example:
<!DOCTYPE html>
<html><body>
<h2 style="color:red">I am Red</h2>
<h2 style="color:blue">I am Blue</h2>
</body> </html>
Change Background color:
Example:
<!DOCTYPE html>
<html>
<body style="background-color:pink">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Change Text Color
Example :
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue">This is a heading</h1>
<p style="color:red">This is a paragraph.</p>
</body>
</html>
Change font-family
Example:
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana">
This is h1 a heading</h1>
<h2 style="font-family:courier">
This is h2 a heading</h2>
</body>
</html>
Change Text Size
Example:
<!DOCTYPE html>
<html>
<body>
<h1 style="font-size:300%">
This is a heading
</h1>
<p style="font-size:160%">
This is a paragraph
.</p>
</body>
</html>
Change Text Alignment
Example:
<!DOCTYPE html>
<html>
<body>
<h1 style="text-align:center"> Centered heading </h1>
<h1 style="text-align:left"> left heading </h1>
<h1 style="text-align:right"> right heading </h1>
</body> </html>
HTML Text Formatting Elements
<b> element or <strong>
• The HTML <b> and <strong> element defines bold text, without any extra
importance.
• Example
<!DOCTYPE html>
<html>
<body>
<p>This text is normal.</p>
<p><b>This text is bold.</b></p>
<p><strong>This text is strong.</strong></p>
</body> </html>
<i> or <em> element
• Both defines italic text, without any extra importance.
• Example
<!DOCTYPE html>
<html>
<body>
<p><em>This text is emphasized.</em></p>
<p>This text is normal.</p>
<p><i>This text is italic.</i></p>
</body>
</html>
<small> element
• The HTML <small> element defines small text:
• Example:
<!DOCTYPE html>
<html>
<body>
<h2>HTML <small>Small</small> Formatting</h2>
</body>
</html>
<mark> element
• The HTML <mark> element defines marked or highlighted text:
• Example
<!DOCTYPE html>
<html>
<body>
<h2>HTML <mark>Marked</mark> Formatting</h2>
</body>
</html>
<del> element
• The HTML <del> element defines deleted (removed) of text.
• Example :
<!DOCTYPE html>
<html>
<body>
<p>The del element represent deleted (removed) text.</p>
<p>My favorite color is <del>blue</del> red.</p>
</body>
</html>
<ins> element
• The HTML <ins> element defines inserted (added) text.
• Example:
<!DOCTYPE html>
<html>
<body>
<p>The ins element represent inserted (added) text.</p>
<p>My favorite <ins>color</ins> is red.</p>
</body>
</html>
<sub> element
• The HTML <sub> element defines subscripted text.
• Example:
<!DOCTYPE html>
<html>
<body>
<p>This is <sub>subscripted</sub> text.</p>
</body>
</html>
<sup> element
• The HTML <sup> element defines superscripted text.
• Example:
<!DOCTYPE html>
<html>
<body>
<p>This is <sup>superscripted</sup> text.</p>
</body>
</html>
HTML Quotation and Citation Elements
<q> element
• The HTML <q> element defines a short quotation.
• Example:
<!DOCTYPE html>
<html>
<body>
<p>Browsers insert quotation marks around the q element.</p>
<p>WWF's goal is to: <q>Build a future where people live in harmony with
nature.</q></p>
</body> </html>
<blockquote> element
• The HTML <blockquote> element defines a quoted section.
• Example:
<!DOCTYPE html>
<html> <body>
<p>Browsers usually indent blockquote elements.</p>
<blockquote>
For 50 years, WWF has been protecting the future of nature.
The world's leading conservation organization,
WWF works in 100 countries and is supported by
1.2 million members in the United States and
close to 5 million globally.
</blockquote>
</body> </html>
<abbr> element
• The HTML <abbr> element defines an abbreviation or an acronym.
• Example
<!DOCTYPE html>
<html>
<body>
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in
1948.</p>
<p>Marking up abbreviations can give useful information to browsers, translation
systems and search-engines.</p>
</body>
</html>
When we put cursor on abbreviation its
full form appear
<address> element
• The HTML <address> element defines contact information (author/owner) of a
document or article.
• Example
<!DOCTYPE html>
<html>
<body>
<p>The HTML address
element defines
contact information
(author/owner)
of a document or
article.</p>
<address>
Written by Jon Doe.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
</body>
</html>
<bdo> element
• The HTML <bdo> element defines bi-directional override.
• If your browser supports bdo, this text will be written from right to left:
• Example
<!DOCTYPE html>
<html>
<body>
<p>If your browser supports bi-directional override (bdo), the next line will be written
from right to left (rtl):</p>
<bdo dir="rtl">This line will be written from right to left</bdo>
</body>
</html>
HTML Styles - CSS
 CSS stands for Cascading Style Sheets
 Styling can be added to HTML elements in 3 ways:
1. Inline - using a style attribute in HTML elements
2. Internal - using a <style> element in the HTML <head> section
3. External - using one or more external CSS files
 The most common way to add styling, is to keep the styles in separate CSS
files.
 SS styling has the following syntax:
element { property:value; property:value }
 The element is an HTML element name. The property is a CSS property.
The value is a CSS value.
Inline Styling (Inline CSS)
• Inline styling is useful for applying a unique style to a single HTML element
• Inline styling uses the style attribute.
• Example
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue">
This is a Blue Heading
</h1>
</body>
</html>
Internal Styling (Internal CSS)
• An internal style sheet can be used to define a common style for all HTML
elements on a page.
• Internal styling is defined in the <head> section of an HTML page, using
a <style> element
• Example:
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color:pink}
h1 {color:blue}
p {color:darkgreen}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body> </html>
External Styling (External CSS)
• External style sheet are ideal when the style is applied to many pages.
• With external style sheets, you can change the look of an entire web site by
changing one file.
• External styles are defined in an external CSS file, and then linked to in
the <head> section of an HTML page
• Example
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
CSS Fonts
• The CSS color property defines the text color to be used for the HTML element.
• The CSS font-family property defines the font to be used for the HTML element.
• The CSS font-size property defines the text size to be used for the HTML
element.
• Example:
<!DOCTYPE html>
<html>
<head> <style> h1 {color:blue; font-family:verdana; font-size:300%;}
p {color:red; font-family:courier; font-size:160%;} </style>
</head>
<body> <h1>This is a heading</h1> <p>This is a paragraph.</p>
</body> </html>
The CSS Box Model
1. Border:
• Every HTML element has a box around it, even if you cannot see it.
• The CSS border property defines a visible border around an HTML element:
• Example
<!DOCTYPE html>
<html>
<head> <style> p {border:1px solid red;} </style> </head>
<body>
<h1>This is a heading</h1> <p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
2. Padding
• The CSS padding property defines a padding (space) inside the border.
• Example
<!DOCTYPE html>
<html>
<head>
<style> p {border:3px solid red;padding:10px;} </style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html>
3. Margin
• The CSS margin property defines a margin (space) outside the border:
• Example
<!DOCTYPE html>
<html><head>
<style>p { border:1px solid red; padding:5px;margin:60px;}
</style></head>
<body>
<h1>This is a heading</h1><p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body></html>
4. The id Attribute
• All the examples above use CSS to style HTML elements in a general way.
• To define a special style for one special element, first add an id attribute to the
element
• Example
<!DOCTYPE html>
<html>
<head>
<style>
p#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>
5. The class Attribute
• To define a style for a special type (class) of elements, add a class attribute to
the element
• Example
<!DOCTYPE html>
<html>
<head>
<style>
p.error {color:red;}
</style>
</head>
<body>
<p>This is a paragraph.</p>
<p class="error">I am different.</p>
<p>This is a paragraph.</p>
<p class="error">I am different too.</p>
</body>
</html>
HTML Links
• HTML links are hyperlinks.
• A hyperlink is a text or an image you can click on, and jump to another
document.
• In HTML, links are defined with the <a> tag
• HTML link syntax is <a href="url"> link text </a>
• The href attribute specifies the destination address (http://www.vethics.com)
• The link text is the visible part (Visit our HTML tutorial).
• Clicking on the link text, will send you to the specified address.
Example :
<!DOCTYPE html>
<html>
<body>
<p>
<a href="http://www.vethics.com">
Visit our website
</a>
</p>
</body>
</html>
By clicking on
link the site
will open
HTML Images
• In HTML, images are defined with the <img> tag.
• The <img> tag is empty, it contains attributes only, and does not have a closing
tag.
• The src attribute defines the url (web address) of the image
• The alt attribute specifies an alternate text for the image, if it cannot be
displayed.
• Its syntax is <img src="url" alt="some_text">
• You can use the style attribute to specify the width and height of an image.
Example
<!DOCTYPE html>
<html>
<body>
<img src="html5.gif" alt="HTML5 Icon"
style="width:150px;height:128px">
</body>
</html>
HTML Lists
Unordered HTML Lists
• An unordered list starts with the <ul> tag.
• Each list item starts with the <li> tag.
• The list items will be marked with bullets (small black circles).
• Examples
<!DOCTYPE html>
<html>
<body>
<h2>
Unordered List with Default Bullets
</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
Style Description
list-style-type:disc The list items will be marked with bullets
(default)
list-style-type:circle The list items will be marked with circles
list-style-type:square The list items will be marked with squares
list-style-type:none The list items will not be marked
Ordered HTML Lists
• An ordered list starts with the <ol> tag.
• Each list item starts with the <li> tag.
• The list items will be marked with numbers.
• Example
<!DOCTYPE html>
<html>
<body>
<h2>Ordered List</h2>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Type Description
type="1" The list items will be numbered with numbers (default)
type="A" The list items will be numbered with uppercase letters
type="a" The list items will be numbered with lowercase letters
type="I" The list items will be numbered with uppercase roman
numbers
type="i" The list items will be numbered with lowercase roman
numbers
HTML Description Lists
• A description list, is a list of terms, with a description of each term.
• The <dl> tag defines a description list.
• The <dt> tag defines the term (name), and the <dd> tag defines the data
(description).
• Example
<!DOCTYPE html>
<html>
<body>
<h2>A Description List</h2>
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
</body>
</html>
HTML Tables
• Tables are defined with the <table> tag.
• Tables are divided into table rows with the <tr> tag.
• Table rows are divided into table data with the <td> tag.
• A table row can also be divided into table headings with the <th> tag.
• If you do not specify a border for the table, it will be displayed without borders.
• A border can be added using the border attribute
Example
<!DOCTYPE html>
<html>
<body> <table border="1" style="width:100%">
<tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr>
<tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr>
<tr> <td>John</td> <td>Doe</td> <td>80</td> </tr>
</table>
</body>
</html>

More Related Content

What's hot

Html text and formatting
Html text and formattingHtml text and formatting
Html text and formattingeShikshak
 
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
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmlvikasgaur31
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
Olivia Moran
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
palhaftab
 
Html forms
Html formsHtml forms
Html coding
Html codingHtml coding
Html coding
Briana VanBuskirk
 
Html1
Html1Html1
Html1
learnt
 
Intro Html
Intro HtmlIntro Html
Intro Html
Chidanand Byahatti
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Html
HtmlHtml
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introductionc525600
 
Html tags
Html tagsHtml tags
Html tags
sotero66
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Html Presentation
Html PresentationHtml Presentation
Html Presentation
RahulSuri30
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
Dave Kelly
 

What's hot (20)

Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
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
 
Html and css
Html and cssHtml and css
Html and css
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
 
Html forms
Html formsHtml forms
Html forms
 
Html coding
Html codingHtml coding
Html coding
 
Html1
Html1Html1
Html1
 
Intro Html
Intro HtmlIntro Html
Intro Html
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Html ppt
Html pptHtml ppt
Html ppt
 
Html
HtmlHtml
Html
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Html tags
Html tagsHtml tags
Html tags
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Html Presentation
Html PresentationHtml Presentation
Html Presentation
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
(Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS (Fast) Introduction to HTML & CSS
(Fast) Introduction to HTML & CSS
 

Viewers also liked

Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background propertiesJesus Obenita Jr.
 
belajar HTML
belajar HTML belajar HTML
Basic html for Normal People
Basic html for Normal PeopleBasic html for Normal People
Basic html for Normal People
Ted Curran
 
Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]
Kosie Eloff
 
Html basic
Html basicHtml basic
Html basic
Viccky Khairnar
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
MayaLisa
 
Perencanaan sumberdaya manusia
Perencanaan sumberdaya manusiaPerencanaan sumberdaya manusia
Perencanaan sumberdaya manusia
Universitas Pendidikan Indonesia
 
Html tutorial.lesson9
Html tutorial.lesson9Html tutorial.lesson9
Html tutorial.lesson9
grassos
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
Html tutorial.lesson12
Html tutorial.lesson12Html tutorial.lesson12
Html tutorial.lesson12
grassos
 
Html tutorial.lesson10
Html tutorial.lesson10Html tutorial.lesson10
Html tutorial.lesson10
grassos
 
Adrianne’s &lt;/html> Tutorial
Adrianne’s &lt;/html> TutorialAdrianne’s &lt;/html> Tutorial
Adrianne’s &lt;/html> Tutorial
Adrianne Navarro
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
Gargee Chatterjee
 
Html
HtmlHtml
Html Tutorial
Html TutorialHtml Tutorial
Html Tutorial
Md. Muhibbullah Muhib
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
eShikshak
 
HTML Training in Ambala ! BATRA COMPUTER CENTRE
HTML Training in Ambala ! BATRA COMPUTER CENTREHTML Training in Ambala ! BATRA COMPUTER CENTRE
HTML Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 

Viewers also liked (20)

Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background properties
 
belajar HTML
belajar HTML belajar HTML
belajar HTML
 
Basic html for Normal People
Basic html for Normal PeopleBasic html for Normal People
Basic html for Normal People
 
Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]
 
Html basic
Html basicHtml basic
Html basic
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Perencanaan sumberdaya manusia
Perencanaan sumberdaya manusiaPerencanaan sumberdaya manusia
Perencanaan sumberdaya manusia
 
Html tutorial.lesson9
Html tutorial.lesson9Html tutorial.lesson9
Html tutorial.lesson9
 
Basic html
Basic htmlBasic html
Basic html
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html tutorial.lesson12
Html tutorial.lesson12Html tutorial.lesson12
Html tutorial.lesson12
 
Html tutorial.lesson10
Html tutorial.lesson10Html tutorial.lesson10
Html tutorial.lesson10
 
Adrianne’s &lt;/html> Tutorial
Adrianne’s &lt;/html> TutorialAdrianne’s &lt;/html> Tutorial
Adrianne’s &lt;/html> Tutorial
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
 
Html
HtmlHtml
Html
 
Html Tutorial
Html TutorialHtml Tutorial
Html Tutorial
 
Html - Tutorial
Html - TutorialHtml - Tutorial
Html - Tutorial
 
Html
HtmlHtml
Html
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
HTML Training in Ambala ! BATRA COMPUTER CENTRE
HTML Training in Ambala ! BATRA COMPUTER CENTREHTML Training in Ambala ! BATRA COMPUTER CENTRE
HTML Training in Ambala ! BATRA COMPUTER CENTRE
 

Similar to Basic Html Knowledge for students

Html notes
Html notesHtml notes
Html notes
Ismail Mukiibi
 
HTML Presentation
HTML Presentation HTML Presentation
HTML Presentation
pradeepthakur87
 
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvddhtmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
hemanthkalyan25
 
htmlnotes Which tells about all the basic
htmlnotes Which tells about all the basichtmlnotes Which tells about all the basic
htmlnotes Which tells about all the basic
hemanthkalyan25
 
Chapter 6 html
Chapter 6 htmlChapter 6 html
Chapter 6 html
home
 
Html
HtmlHtml
SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
Sky Infotech
 
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
fathima12
 
Learning html. (Part- 1)
Learning html. (Part- 1)Learning html. (Part- 1)
Learning html. (Part- 1)
manya abrol
 
Html
HtmlHtml
html.pdf
html.pdfhtml.pdf
html.pdf
ArianSS1
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
NAGARAJU MAMILLAPALLY
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
Shankar D
 
An introduction to html
An introduction to htmlAn introduction to html
An introduction to html
kashifareed
 
Html ppt
Html pptHtml ppt
Html ppt
Ruchi Kumari
 

Similar to Basic Html Knowledge for students (20)

Html notes
Html notesHtml notes
Html notes
 
HTML Presentation
HTML Presentation HTML Presentation
HTML Presentation
 
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvddhtmlnotes-180924151434.pdf dafdkzndsvkdvdd
htmlnotes-180924151434.pdf dafdkzndsvkdvdd
 
htmlnotes Which tells about all the basic
htmlnotes Which tells about all the basichtmlnotes Which tells about all the basic
htmlnotes Which tells about all the basic
 
Chapter 6 html
Chapter 6 htmlChapter 6 html
Chapter 6 html
 
Learn html from www
Learn html from wwwLearn html from www
Learn html from www
 
Html
HtmlHtml
Html
 
Html example
Html exampleHtml example
Html example
 
SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
 
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
 
Learning html. (Part- 1)
Learning html. (Part- 1)Learning html. (Part- 1)
Learning html. (Part- 1)
 
Html
HtmlHtml
Html
 
html.pdf
html.pdfhtml.pdf
html.pdf
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
An introduction to html
An introduction to htmlAn introduction to html
An introduction to html
 
HTML for Education
HTML for EducationHTML for Education
HTML for Education
 
Html basics NOTE
Html basics NOTEHtml basics NOTE
Html basics NOTE
 
Html ppt
Html pptHtml ppt
Html ppt
 

More from vethics

learn about Structure of human eye in hindi
learn about Structure of human eye in hindi learn about Structure of human eye in hindi
learn about Structure of human eye in hindi
vethics
 
ppt of our Solar system in hindi
ppt of our Solar system in hindippt of our Solar system in hindi
ppt of our Solar system in hindi
vethics
 
Earthquake ppt in hindi
Earthquake ppt in hindi Earthquake ppt in hindi
Earthquake ppt in hindi
vethics
 
Microsoft word ppt presentation
 Microsoft word  ppt presentation Microsoft word  ppt presentation
Microsoft word ppt presentation
vethics
 
Learn MS Powerpoint basics
Learn MS Powerpoint basicsLearn MS Powerpoint basics
Learn MS Powerpoint basics
vethics
 
Ms access basics ppt
Ms access basics ppt Ms access basics ppt
Ms access basics ppt
vethics
 
Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentation
vethics
 
Basics of Microsoft windows
Basics of Microsoft windows Basics of Microsoft windows
Basics of Microsoft windows
vethics
 
Basics of Computer for Students
Basics of Computer for StudentsBasics of Computer for Students
Basics of Computer for Students
vethics
 
Societal Impact of Information Technology
Societal Impact of Information TechnologySocietal Impact of Information Technology
Societal Impact of Information Technology
vethics
 

More from vethics (10)

learn about Structure of human eye in hindi
learn about Structure of human eye in hindi learn about Structure of human eye in hindi
learn about Structure of human eye in hindi
 
ppt of our Solar system in hindi
ppt of our Solar system in hindippt of our Solar system in hindi
ppt of our Solar system in hindi
 
Earthquake ppt in hindi
Earthquake ppt in hindi Earthquake ppt in hindi
Earthquake ppt in hindi
 
Microsoft word ppt presentation
 Microsoft word  ppt presentation Microsoft word  ppt presentation
Microsoft word ppt presentation
 
Learn MS Powerpoint basics
Learn MS Powerpoint basicsLearn MS Powerpoint basics
Learn MS Powerpoint basics
 
Ms access basics ppt
Ms access basics ppt Ms access basics ppt
Ms access basics ppt
 
Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentation
 
Basics of Microsoft windows
Basics of Microsoft windows Basics of Microsoft windows
Basics of Microsoft windows
 
Basics of Computer for Students
Basics of Computer for StudentsBasics of Computer for Students
Basics of Computer for Students
 
Societal Impact of Information Technology
Societal Impact of Information TechnologySocietal Impact of Information Technology
Societal Impact of Information Technology
 

Recently uploaded

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

Basic Html Knowledge for students

  • 1.
  • 2. What is HTML?  HTML is short for "Hyper Text Markup Language".  It simply means it is a language for describing web-pages using ordinary text.  All HTML documents must start with a type declaration: <!DOCTYPE html>.  The HTML document itself begins with <html> and ends with </html>.  The visible part of the HTML document is between <body> and </body>.
  • 4. • Every web page is actually a HTML file. • Each HTML file is just a plain-text file, but with a .html file extension instead of .txt, and is made up of many HTML tags as well as the content for a web page. A web site will often contain many html files that link to each other. You can edit HTML files with your favorite editor. Like Adobe Dreamweaver, Microsoft Expression Web, Coffee Cup HTML Editor HTML Files
  • 5. HTML Tags  HTML tags are the hidden keywords within a web page that define how the browser must format and display the content.  Most tags must have two parts, an opening and a closing part.  For example, <html> is the opening tag and </html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash ( / ) character.  The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML documents and display them.  The browser does not display the HTML tags, but uses them to determine how to display the document:
  • 6.  The DOCTYPE declaration defines the document type to be HTML  The text between <html> and </html> describes an HTML document  The text between <head> and </head> provides information about the document  The text between <title> and </title> provides a title for the document  The text between <body> and </body> describes the visible page content  The text between <h1> and </h1> describes a heading  The text between <p> and </p> describes a paragraph
  • 7. HTML Elements • An HTML element is defined by a starting tag. If the element contains other content, it ends with a closing tag, where the element name is preceded by a forward slash as shown below with few tags: Start Tag Content End Tag <p> This is paragraph content. </p> <h1> This is heading content. </h1> <div> This is division content. </div> <br />
  • 8. • Here <p>....</p> is an HTML element, <h1>...</h1> is another HTML element. • There are some HTML elements which don't need to be closed, such as <img.../>, <hr /> and <br /> elements. • These are known as void elements. • HTML documents consist of a tree of these elements and they specify how HTML documents should be built, and what kind of content should be placed in what part of an HTML document. • An HTML element is defined by a starting tag. If the element contains other content, it ends with a closing tag. • For example <p> is starting tag of a paragraph and </p> is closing tag of the same paragraph but <p>This is paragraph</p> is a paragraph element
  • 9. HTML Attributes  An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag. All attributes are made up of two parts: a name and a value.  The name is the property you want to set. For example, the paragraph <p> element in the example carries an attribute whose name is align, which you can use to indicate the alignment of paragraph on the page.  The value is what you want the value of the property to be set and always put within quotations. The below example shows three possible values of align attribute: left, center and right.
  • 11. Core Attributes The four core attributes that can be used on the majority of HTML elements are:  Id  Title  Class  style
  • 12. The id Attribute  The id attribute of an HTML tag can be used to uniquely identify any element within an HTML page. There are two primary reasons that you might want to use an id attribute on an element:  If an element carries an id attribute as a unique identifier it is possible to identify just that element and its content.  If you have two elements of the same name within a Web page (or style sheet), you can use the id attribute to distinguish between elements that have the same name.  Example: <p id="html">This para explains what is HTML</p> <p id="css">This para explains what is Cascading Style Sheet</p>
  • 13. The title Attribute • The title attribute gives a suggested title for the element. They syntax for the title attribute is similar as explained for id attribute: • Example <!DOCTYPE html> <html> <head> <title>The title Attribute Example</title> </head> <body> <h3 title="Hello HTML!">Titled Heading Tag Example</h3> </body> </html>
  • 14. The class Attribute • The class attribute is used to associate an element with a style sheet, and specifies the class of element. • Example: class="className1 className2 className3"
  • 15. The style Attribute • The style attribute allows you to specify Casecading Style Sheet (CSS) rules within the element. • Example: <!DOCTYPE html> <html> <head> <title>The style Attribute</title> </head> <body> <p style="font-family:arial; color:#FF0000;">Some text...</p> </body> </html>
  • 16. HTML Headings • Headings are defined with the <h1> to <h6> tags. • <h1> defines the most important heading. <h6> defines the least important heading. Example: <!DOCTYPE html> <html> <body> <h1>This is heading 1</h1> <h2>This is heading 2</h2> <h3>This is heading 3</h3> <h4>This is heading 4</h4> <h5>This is heading 5</h5> <h6>This is heading 6</h6> </body> </html>
  • 17. <hr> tag  The <hr> tag creates a horizontal line in an HTML page.  The hr element can be used to separate content:  Example: <!DOCTYPE html> <html> <body> <p>The hr tag defines a horizontal rule:</p> <hr> <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p> <hr> <p>This is a paragraph.</p> </body> </html>
  • 18. HTML Paragraphs • <p> </p> element • The HTML <p> element defines a paragraph. • In HTML You cannot be sure how HTML will be displayed. • Large or small screens, and resized windows will create different results. • With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code. • The browser will remove extra spaces and extra lines when the page is displayed. • Any number of spaces, and any number of new lines, count as only one space.
  • 19. Example: <!DOCTYPE html> <html> <body> <p> This paragraph contains a lot of lines. it also contains lots of space. </p> </body> </html>
  • 20. • <br> element • 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 <br> element is an empty HTML element. It has no end tag. • Example : <!DOCTYPE html> <html> <body> <p>This is<br>a para<br>graph with<br> line breaks</p> </body> </html>
  • 21. • <pre> element • The HTML <pre> element defines preformatted text. • The text inside a <pre> element is displayed in a fixed-width font. • It is used for poem writing. • Example: <!DOCTYPE html> <html> <body> <p>The pre tag preserves both spaces and line breaks:</p> <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> </body> </html>
  • 22.
  • 23. HTML Styles • 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. • The HTML style attribute has the following syntax: style="property:value“ • Example: <!DOCTYPE html> <html><body> <h2 style="color:red">I am Red</h2> <h2 style="color:blue">I am Blue</h2> </body> </html>
  • 24. Change Background color: Example: <!DOCTYPE html> <html> <body style="background-color:pink"> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 25. Change Text Color Example : <!DOCTYPE html> <html> <body> <h1 style="color:blue">This is a heading</h1> <p style="color:red">This is a paragraph.</p> </body> </html>
  • 26. Change font-family Example: <!DOCTYPE html> <html> <body> <h1 style="font-family:verdana"> This is h1 a heading</h1> <h2 style="font-family:courier"> This is h2 a heading</h2> </body> </html>
  • 27. Change Text Size Example: <!DOCTYPE html> <html> <body> <h1 style="font-size:300%"> This is a heading </h1> <p style="font-size:160%"> This is a paragraph .</p> </body> </html>
  • 28. Change Text Alignment Example: <!DOCTYPE html> <html> <body> <h1 style="text-align:center"> Centered heading </h1> <h1 style="text-align:left"> left heading </h1> <h1 style="text-align:right"> right heading </h1> </body> </html>
  • 29. HTML Text Formatting Elements <b> element or <strong> • The HTML <b> and <strong> element defines bold text, without any extra importance. • Example <!DOCTYPE html> <html> <body> <p>This text is normal.</p> <p><b>This text is bold.</b></p> <p><strong>This text is strong.</strong></p> </body> </html>
  • 30. <i> or <em> element • Both defines italic text, without any extra importance. • Example <!DOCTYPE html> <html> <body> <p><em>This text is emphasized.</em></p> <p>This text is normal.</p> <p><i>This text is italic.</i></p> </body> </html>
  • 31. <small> element • The HTML <small> element defines small text: • Example: <!DOCTYPE html> <html> <body> <h2>HTML <small>Small</small> Formatting</h2> </body> </html>
  • 32. <mark> element • The HTML <mark> element defines marked or highlighted text: • Example <!DOCTYPE html> <html> <body> <h2>HTML <mark>Marked</mark> Formatting</h2> </body> </html>
  • 33. <del> element • The HTML <del> element defines deleted (removed) of text. • Example : <!DOCTYPE html> <html> <body> <p>The del element represent deleted (removed) text.</p> <p>My favorite color is <del>blue</del> red.</p> </body> </html>
  • 34. <ins> element • The HTML <ins> element defines inserted (added) text. • Example: <!DOCTYPE html> <html> <body> <p>The ins element represent inserted (added) text.</p> <p>My favorite <ins>color</ins> is red.</p> </body> </html>
  • 35. <sub> element • The HTML <sub> element defines subscripted text. • Example: <!DOCTYPE html> <html> <body> <p>This is <sub>subscripted</sub> text.</p> </body> </html>
  • 36. <sup> element • The HTML <sup> element defines superscripted text. • Example: <!DOCTYPE html> <html> <body> <p>This is <sup>superscripted</sup> text.</p> </body> </html>
  • 37. HTML Quotation and Citation Elements <q> element • The HTML <q> element defines a short quotation. • Example: <!DOCTYPE html> <html> <body> <p>Browsers insert quotation marks around the q element.</p> <p>WWF's goal is to: <q>Build a future where people live in harmony with nature.</q></p> </body> </html>
  • 38. <blockquote> element • The HTML <blockquote> element defines a quoted section. • Example: <!DOCTYPE html> <html> <body> <p>Browsers usually indent blockquote elements.</p> <blockquote> For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. </blockquote> </body> </html>
  • 39. <abbr> element • The HTML <abbr> element defines an abbreviation or an acronym. • Example <!DOCTYPE html> <html> <body> <p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p> <p>Marking up abbreviations can give useful information to browsers, translation systems and search-engines.</p> </body> </html> When we put cursor on abbreviation its full form appear
  • 40. <address> element • The HTML <address> element defines contact information (author/owner) of a document or article. • Example <!DOCTYPE html> <html> <body> <p>The HTML address element defines contact information (author/owner) of a document or article.</p> <address> Written by Jon Doe.<br> Visit us at:<br> Example.com<br> Box 564, Disneyland<br> USA </address> </body> </html>
  • 41. <bdo> element • The HTML <bdo> element defines bi-directional override. • If your browser supports bdo, this text will be written from right to left: • Example <!DOCTYPE html> <html> <body> <p>If your browser supports bi-directional override (bdo), the next line will be written from right to left (rtl):</p> <bdo dir="rtl">This line will be written from right to left</bdo> </body> </html>
  • 42. HTML Styles - CSS  CSS stands for Cascading Style Sheets  Styling can be added to HTML elements in 3 ways: 1. Inline - using a style attribute in HTML elements 2. Internal - using a <style> element in the HTML <head> section 3. External - using one or more external CSS files  The most common way to add styling, is to keep the styles in separate CSS files.  SS styling has the following syntax: element { property:value; property:value }  The element is an HTML element name. The property is a CSS property. The value is a CSS value.
  • 43. Inline Styling (Inline CSS) • Inline styling is useful for applying a unique style to a single HTML element • Inline styling uses the style attribute. • Example <!DOCTYPE html> <html> <body> <h1 style="color:blue"> This is a Blue Heading </h1> </body> </html>
  • 44. Internal Styling (Internal CSS) • An internal style sheet can be used to define a common style for all HTML elements on a page. • Internal styling is defined in the <head> section of an HTML page, using a <style> element • Example: <!DOCTYPE html> <html> <head> <style> body {background-color:pink} h1 {color:blue} p {color:darkgreen} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 45. External Styling (External CSS) • External style sheet are ideal when the style is applied to many pages. • With external style sheets, you can change the look of an entire web site by changing one file. • External styles are defined in an external CSS file, and then linked to in the <head> section of an HTML page • Example <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 46. CSS Fonts • The CSS color property defines the text color to be used for the HTML element. • The CSS font-family property defines the font to be used for the HTML element. • The CSS font-size property defines the text size to be used for the HTML element. • Example: <!DOCTYPE html> <html> <head> <style> h1 {color:blue; font-family:verdana; font-size:300%;} p {color:red; font-family:courier; font-size:160%;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 47. The CSS Box Model 1. Border: • Every HTML element has a box around it, even if you cannot see it. • The CSS border property defines a visible border around an HTML element: • Example <!DOCTYPE html> <html> <head> <style> p {border:1px solid red;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 48. 2. Padding • The CSS padding property defines a padding (space) inside the border. • Example <!DOCTYPE html> <html> <head> <style> p {border:3px solid red;padding:10px;} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> <p>This is a paragraph.</p> </body> </html>
  • 49. 3. Margin • The CSS margin property defines a margin (space) outside the border: • Example <!DOCTYPE html> <html><head> <style>p { border:1px solid red; padding:5px;margin:60px;} </style></head> <body> <h1>This is a heading</h1><p>This is a paragraph.</p> <p>This is a paragraph.</p> </body></html>
  • 50. 4. The id Attribute • All the examples above use CSS to style HTML elements in a general way. • To define a special style for one special element, first add an id attribute to the element • Example <!DOCTYPE html> <html> <head> <style> p#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>
  • 51. 5. The class Attribute • To define a style for a special type (class) of elements, add a class attribute to the element • Example <!DOCTYPE html> <html> <head> <style> p.error {color:red;} </style> </head> <body> <p>This is a paragraph.</p> <p class="error">I am different.</p> <p>This is a paragraph.</p> <p class="error">I am different too.</p> </body> </html>
  • 52. HTML Links • HTML links are hyperlinks. • A hyperlink is a text or an image you can click on, and jump to another document. • In HTML, links are defined with the <a> tag • HTML link syntax is <a href="url"> link text </a> • The href attribute specifies the destination address (http://www.vethics.com) • The link text is the visible part (Visit our HTML tutorial). • Clicking on the link text, will send you to the specified address.
  • 53. Example : <!DOCTYPE html> <html> <body> <p> <a href="http://www.vethics.com"> Visit our website </a> </p> </body> </html> By clicking on link the site will open
  • 54. HTML Images • In HTML, images are defined with the <img> tag. • The <img> tag is empty, it contains attributes only, and does not have a closing tag. • The src attribute defines the url (web address) of the image • The alt attribute specifies an alternate text for the image, if it cannot be displayed. • Its syntax is <img src="url" alt="some_text"> • You can use the style attribute to specify the width and height of an image.
  • 55. Example <!DOCTYPE html> <html> <body> <img src="html5.gif" alt="HTML5 Icon" style="width:150px;height:128px"> </body> </html>
  • 56. HTML Lists Unordered HTML Lists • An unordered list starts with the <ul> tag. • Each list item starts with the <li> tag. • The list items will be marked with bullets (small black circles). • Examples <!DOCTYPE html> <html> <body> <h2> Unordered List with Default Bullets </h2> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html>
  • 57. Style Description list-style-type:disc The list items will be marked with bullets (default) list-style-type:circle The list items will be marked with circles list-style-type:square The list items will be marked with squares list-style-type:none The list items will not be marked
  • 58. Ordered HTML Lists • An ordered list starts with the <ol> tag. • Each list item starts with the <li> tag. • The list items will be marked with numbers. • Example <!DOCTYPE html> <html> <body> <h2>Ordered List</h2> <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> </body> </html>
  • 59. Type Description type="1" The list items will be numbered with numbers (default) type="A" The list items will be numbered with uppercase letters type="a" The list items will be numbered with lowercase letters type="I" The list items will be numbered with uppercase roman numbers type="i" The list items will be numbered with lowercase roman numbers
  • 60. HTML Description Lists • A description list, is a list of terms, with a description of each term. • The <dl> tag defines a description list. • The <dt> tag defines the term (name), and the <dd> tag defines the data (description). • Example <!DOCTYPE html> <html> <body> <h2>A Description List</h2> <dl> <dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl> </body> </html>
  • 61. HTML Tables • Tables are defined with the <table> tag. • Tables are divided into table rows with the <tr> tag. • Table rows are divided into table data with the <td> tag. • A table row can also be divided into table headings with the <th> tag. • If you do not specify a border for the table, it will be displayed without borders. • A border can be added using the border attribute
  • 62. Example <!DOCTYPE html> <html> <body> <table border="1" style="width:100%"> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>80</td> </tr> </table> </body> </html>