SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
HTML
HEADINGS, PARAGRAPHS,
FORMATTING, LINKS, HEAD, CSS,
IMAGES
HTML HEADINGS
Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least
important heading.
Example :
Note:
Browsers automatically add some empty space (a margin) before and after each
heading.
Apep Kamaludin, MT. | http://www.w3schools.com
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
HTML HEADINGS
Headings Are Important
Use HTML headings for headings only. Don't use headings to
make text BIG or bold.
Search engines use your headings to index the structure and
content of your web pages.
Since users may skim your pages by its headings, it is important
to use headings to show the document structure.
H1 headings should be used as main headings, followed by H2
headings, then the less important H3 headings, and so on.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML HEADINGS
HTML Lines
The <hr>tag creates a horizontal line in an HTML page.
The hr element can be used to separate content:
Example :
Apep Kamaludin, MT. | http://www.w3schools.com
<p>This is a paragraph</p>
<hr><p>This is a paragraph</p>
<hr><p>This is a paragraph</p>
HTML HEADINGS
HTML Comments
Comments can be inserted into the HTML code to make it more
readable and understandable. Comments are ignored by the
browser and are not displayed.
Comments are written like this:
Example
Note: There is an exclamation point after the opening bracket, but
not before the closing bracket.
Apep Kamaludin, MT. | http://www.w3schools.com
<!-- This is a comment -->
HTML HEADINGS
HTML Tip - How to View HTML Source
Have you ever seen a Web page and wondered "Hey! How did
they do that?"
To find out, right-click in the page and select "View Source" (IE) or
"View Page Source" (Firefox), or similar for other browsers. This
will open a window containing the HTML code of the page.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML HEADINGS
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.
Apep Kamaludin, MT. | http://www.w3schools.com
Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> to <h6> Defines HTML headings
<hr> Defines a horizontal line
<!--> Defines a comment
HTML PARAGRAPHS
Paragraphs are defined with the <p> tag.
Example
Note: Browsers automatically add an empty line before and after
a paragraph.
Apep Kamaludin, MT. | http://www.w3schools.com
<p>This is a paragraph</p>
<p>This is another paragraph</p>
HTML PARAGRAPHS
Don't Forget the End Tag
Most browsers will display HTML correctly even if you forget the
end tag:
Example
The example above will work in most browsers, but don't rely on
it. Forgetting the end tag can produce unexpected results or
errors.
Note: Future version of HTML will not allow you to skip end tags.
Apep Kamaludin, MT. | http://www.w3schools.com
<p>This is a paragraph
<p>This is another paragraph
HTML PARAGRAPHS
HTML Line Breaks
Use the <br> tag if you want a line break (a new line) without
starting a new paragraph:
Example :
The <br> element is an empty HTML element. It has no end tag.
Apep Kamaludin, MT. | http://www.w3schools.com
<p>This is<br>a para<br>graph with line breaks</p>
HTML PARAGRAPHS
<br> or <br />
In XHTML and XML, elements with no end tag (closing tag) are
not allowed.
Both <br> and <br />works in all HTML browsers, but for XHTML
and XML applications you must use <br />.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML PARAGRAPHS
HTML Output - Useful Tips
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 lines count as one line, and any
number of spaces count as one space.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML TEXT FORMATTING
This text is bold
This text is big
This text is italic
This is computer output
This is subscript and superscript
Apep Kamaludin, MT. | http://www.w3schools.com
HTML TEXT FORMATTING
HTML Formatting Tags
HTML uses tags like <b> and <i> for formatting output, like bold or
italic text.
These HTML tags are called formatting tags (look at the bottom of
this page for a complete reference).
Apep Kamaludin, MT. | http://www.w3schools.com
Often <strong> renders as <b>, and <em> renders as <i>.
However, there is a difference in the meaning of these tags:
<b> or <i> defines bold or italic text only.
<strong> or <em> means that you want the text to be rendered in a way that the user
understands as "important". Today, all major browsers render strong as bold and em
as italics. However, if a browser one day wants to make a text highlighted with the
strong feature, it might be cursive for example and not bold!
HTML TEXT FORMATTING
Tag Description
<b> Defines bold text
<big> Defines big text
<em> Defines emphasized text
<i> Defines a part of text in an alternate voice or mood
<small> Defines small text
<strong> Defines strong text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
Apep Kamaludin, MT. | http://www.w3schools.com
HTML Text Formatting Tags
HTML TEXT FORMATTING
Tag Description
<code> Defines computer code text
<kbd> Defines keyboard text
<samp> Defines sample computer code
<tt> Defines teletype text
<var> Defines a variable
<pre> Defines preformatted text
Apep Kamaludin, MT. | http://www.w3schools.com
HTML "Computer Output" Tags
HTML TEXT FORMATTING
Tag Description
<abbr> Defines an abbreviation
<acronym> Defines an acronym
<address>
Defines contact information for the author/owner of a
document
<bdo> Defines the text direction
<blockquote> Defines a section that is quoted from another source
<q> Defines an inline (short) quotation
<cite> Defines the title of a work
<dfn> Defines a definition term
Apep Kamaludin, MT. | http://www.w3schools.com
HTML Citations, Quotations, and Definition Tags
HTML LINKS
Links are found in nearly all Web pages. Links allow users to click
their way from page to page.
HTML Hyperlinks (Links)
A hyperlink (or link) is a word, group of words, or image that you can
click on to jump to a new document or a new section within the
current document.
When you move the cursor over a link in a Web page, the arrow will
turn into a little hand.
Links are specified in HTML using the <a> tag.
The <a> tag can be used in two ways:
1. To create a link to another document, by using the href attribute
2. To create a bookmark inside a document, by using the name
attribute
Apep Kamaludin, MT. | http://www.w3schools.com
HTML LINKS
HTML Link Syntax
The HTML code for a link is simple. It looks like this:
The href attribute specifies the destination of a link.
Example
which will display like this: Visit W3Schools
Clicking on this hyperlink will send the user to W3Schools'
homepage.
Tip: The "Link text" doesn't have to be text. It can be an image or any
other HTML element.
Apep Kamaludin, MT. | http://www.w3schools.com
<a href="url">Link text</a>
<a href="http://www.w3schools.com/">Visit W3Schools</a>
HTML LINKS
HTML Links - The target Attribute
The target attribute specifies where to open the linked document.
The example below will open the linked document in a new
browser window or a new tab:
Example
Apep Kamaludin, MT. | http://www.w3schools.com
<a href="http://www.w3schools.com/" target="_blank">Visit W3Schools!</a>
HTML LINKS
HTML Links - The name Attribute
The name attribute specifies the name of an anchor.
The name attribute is used to create a bookmark inside an HTML
document.
Note: The upcoming HTML5 standard suggests using the id
attribute instead of the name attribute for specifying the name of
an anchor. Using the id attribute actually works also for HTML4 in
all modern browsers.
Bookmarks are not displayed in any special way. They are
invisible to the reader.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML LINKS
Example
A named anchor inside an HTML document:
Create a link to the "Useful Tips Section" inside the same
document:
Or, create a link to the "Useful Tips Section" from another page:
Apep Kamaludin, MT. | http://www.w3schools.com
<a name="tips">Useful Tips Section</a>
<a href="#tips">Visit the Useful Tips Section</a>
<a href="http://www.w3schools.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
HTML LINKS
Basic Notes - Useful Tips
Note: Always add a trailing slash to subfolder references. If you
link like this: href="http://www.w3schools.com/html", you will
generate two requests to the server, the server will first add a
slash to the address, and then create a new request like this:
href="http://www.w3schools.com/html/".
Tip: Named anchors are often used to create "table of contents" at
the beginning of a large document. Each chapter within the
document is given a named anchor, and links to each of these
anchors are put at the top of the document.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML <HEAD>
The HTML <head> Element
The <head> element is a container for all the head elements.
Elements inside <head> can include scripts, instruct the browser
where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>,
<base>, <link>, <meta>, <script>, and <style>.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML <HEAD>
The HTML <title> Element
The <title> tag defines the title of the document.
The title element is required in all HTML/XHTML documents.
The title element:
defines a title in the browser toolbar
provides a title for the page when it is added to favorites
displays a title for the page in search-engine results
A simplified HTML document:
Apep Kamaludin, MT. | http://www.w3schools.com
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
HTML <HEAD>
The HTML <base> Element
The <base> tag specifies a default address or a default target for
all links on a page:
Apep Kamaludin, MT. | http://www.w3schools.com
<head>
<base href="http://www.w3schools.com/images/"><base target="_blank">
</head>
HTML <HEAD>
The HTML <link> Element
The <link> tag defines the relationship between a document and
an external resource.
The <link> tag is most used to link to style sheets:
Apep Kamaludin, MT. | http://www.w3schools.com
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
HTML <HEAD>
The HTML <style> Element
The <style> tag is used to define style information for an HTML
document.
Inside the style element you specify how HTML elements should
render in a browser:
Apep Kamaludin, MT. | http://www.w3schools.com
<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>
HTML <HEAD>
The HTML <meta> Element
Metadata is information about data.
The <meta> tag provides metadata about the HTML document.
Metadata will not be displayed on the page, but will be machine
readable.
Meta elements are typically used to specify page description,
keywords, author of the document, last modified, and other
metadata.
The <meta> tag always goes inside the head element.
The metadata can be used by browsers (how to display content or
reload page), search engines (keywords), or other web services.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML <HEAD>
Keywords for Search Engines
Some search engines will use the name and content attributes of
the meta element to index your pages.
The following meta element defines a description of a page:
The following meta element defines keywords for a page:
The intention of the name and content attributes is to describe the
content of a page.
Apep Kamaludin, MT. | http://www.w3schools.com
<meta name="keywords" content="HTML, CSS, XML">
<meta name="description" content="Free Web tutorials on HTML, CSS, XML">
HTML <HEAD>
The HTML <script> Element
The <script> tag is used to define a client-side script, such as a
JavaScript.
The script element will be explained in a later chapter.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML <HEAD>
HTML head Elements
Apep Kamaludin, MT. | http://www.w3schools.com
Tag Description
<head> Defines information about the document
<title> Defines the title of a document
<base>
Defines a default address or a default target for all links on
a page
<link>
Defines the relationship between a document and an
external resource
<meta> Defines metadata about an HTML document
<script> Defines a client-side script
<style> Defines style information for a document
HTML STYLES - CSS
CSS (Cascading Style Sheets) is used to style HTML elements.
Apep Kamaludin, MT. | http://www.w3schools.com
Look! Styles and colors
This text is in Verdana and red
This text is in Times and blue
This text is 30 pixels high
HTML STYLES - CSS
Styling HTML with CSS
CSS was introduced together with HTML 4, to provide a better way to
style HTML elements.
CSS can be added to HTML in the following ways:
• Inline - using the style attribute in HTML elements
• Internal - using the <style> element in the <head> section
• External - using an external CSS file
The preferred way to add CSS to HTML, is to put CSS syntax in
separate CSS files.
However, in this HTML tutorial we will introduce you to CSS using the
style attribute. This is done to simplify the examples. It also makes it
easier for you to edit the code and try it yourself.
Apep Kamaludin, MT. | http://www.w3schools.com
HTML STYLES - CSS
Inline Styles
An inline style can be used if a unique style is to be applied to one
single occurrence of an element.
To use inline styles, use the style attribute in the relevant tag. The
style attribute can contain any CSS property. The example below
shows how to change the text color and the left margin of a
paragraph:
Apep Kamaludin, MT. | http://www.w3schools.com
<p style="color:blue;margin-left:20px;">This is a paragraph.</p>
HTML STYLES - CSS
HTML Style Example - Background Color
The background-color property defines the background color for
an element:
Example
Apep Kamaludin, MT. | http://www.w3schools.com
<!DOCTYPE html>
<html>
<body style="background-color:yellow;">
<h2 style="background-color:red;">This is a heading</h2>
<p style="background-color:green;">This is a paragraph.</p>
</body>
</html>
HTML STYLES - CSS
HTML Style Example - Font, Color and Size
The font-family, color, and font-size properties defines the font,
color, and size of the text in an element:
Example
Apep Kamaludin, MT. | http://www.w3schools.com
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">A heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">A
paragraph.</p>
</body>
</html>
HTML STYLES - CSS
HTML Style Example - Text Alignment
The text-align property specifies the horizontal alignment of text in
an element:
Example
Apep Kamaludin, MT. | http://www.w3schools.com
<!DOCTYPE html>
<html>
<body>
<h1 style="text-align:center;">Center-aligned heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
HTML STYLES - CSS
Internal Style Sheet
An internal style sheet can be used if one single document has a
unique style. Internal styles are defined in the <head> section of
an HTML page, by using the <style> tag, like this:
Apep Kamaludin, MT. | http://www.w3schools.com
<head>
<style type="text/css">
body {background-color:yellow;}
p {color:blue;}
</style>
</head>
HTML STYLES - CSS
External Style Sheet
An external style sheet is ideal when the style is applied to many
pages. With an external style sheet, you can change the look of
an entire Web site by changing one file. Each page must link to
the style sheet using the <link> tag. The <link> tag goes inside the
<head> section:
Apep Kamaludin, MT. | http://www.w3schools.com
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

Mais conteúdo relacionado

Mais procurados

Basic html tutorial
Basic html tutorialBasic html tutorial
Basic html tutorial
Deep Gates
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
faizibra
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
desaipratu10
 

Mais procurados (18)

Practical file on web technology(html)
Practical file on web technology(html)Practical file on web technology(html)
Practical file on web technology(html)
 
Web Application and HTML Summary
Web Application and HTML SummaryWeb Application and HTML Summary
Web Application and HTML Summary
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
HTML
HTMLHTML
HTML
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
HTML
HTMLHTML
HTML
 
Hyper text markup Language
Hyper text markup LanguageHyper text markup Language
Hyper text markup Language
 
Html introduction
Html introductionHtml introduction
Html introduction
 
HTML practical guide for O/L exam
HTML practical guide for O/L examHTML practical guide for O/L exam
HTML practical guide for O/L exam
 
HTML Tags
HTML Tags HTML Tags
HTML Tags
 
Basic html tutorial
Basic html tutorialBasic html tutorial
Basic html tutorial
 
Html example
Html exampleHtml example
Html example
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Html ppt
Html pptHtml ppt
Html ppt
 
Basic HTML Tutorial For Beginners
Basic HTML Tutorial For BeginnersBasic HTML Tutorial For Beginners
Basic HTML Tutorial For Beginners
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
 
Learn HTML Step By Step
Learn HTML Step By StepLearn HTML Step By Step
Learn HTML Step By Step
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
 

Destaque

Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background properties
Jesus Obenita Jr.
 
Final demo tle
Final demo   tleFinal demo   tle
Final demo tle
floeaz02
 

Destaque (17)

Css color and background properties
Css color and background propertiesCss color and background properties
Css color and background properties
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
Perencanaan sumberdaya manusia
Perencanaan sumberdaya manusiaPerencanaan sumberdaya manusia
Perencanaan sumberdaya manusia
 
Contoh.html1
Contoh.html1Contoh.html1
Contoh.html1
 
belajar HTML 1
belajar HTML 1belajar HTML 1
belajar HTML 1
 
Tutorial dasar laravel
Tutorial dasar laravelTutorial dasar laravel
Tutorial dasar laravel
 
Arsitektur dan Organisasi Komputer - infiniband
Arsitektur dan Organisasi Komputer - infiniband Arsitektur dan Organisasi Komputer - infiniband
Arsitektur dan Organisasi Komputer - infiniband
 
Belajar Web HTML – Modul 6 Hyperlink
Belajar Web HTML – Modul 6 Hyperlink Belajar Web HTML – Modul 6 Hyperlink
Belajar Web HTML – Modul 6 Hyperlink
 
Belajar Web HTML – Modul 4 List
Belajar Web HTML – Modul 4 ListBelajar Web HTML – Modul 4 List
Belajar Web HTML – Modul 4 List
 
Basic html for Normal People
Basic html for Normal PeopleBasic html for Normal People
Basic html for Normal People
 
Html basic
Html basicHtml basic
Html basic
 
Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]Introduction to basic HTML [Librarian edition]
Introduction to basic HTML [Librarian edition]
 
Bermain main dengan linux
Bermain main dengan linuxBermain main dengan linux
Bermain main dengan linux
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Lesson Plan in Technical Livelihood Education (TLE)
Lesson Plan in Technical Livelihood Education (TLE)Lesson Plan in Technical Livelihood Education (TLE)
Lesson Plan in Technical Livelihood Education (TLE)
 
Final demo tle
Final demo   tleFinal demo   tle
Final demo tle
 
Final Demo Semi Detailed Lesson Plan in TLE 2 (LAN Cabling)
Final Demo Semi Detailed Lesson Plan in TLE 2 (LAN Cabling)Final Demo Semi Detailed Lesson Plan in TLE 2 (LAN Cabling)
Final Demo Semi Detailed Lesson Plan in TLE 2 (LAN Cabling)
 

Semelhante a belajar HTML

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
 

Semelhante a belajar HTML (20)

Headings
HeadingsHeadings
Headings
 
html
htmlhtml
html
 
HTML Foundations, part 1
HTML Foundations, part 1HTML Foundations, part 1
HTML Foundations, part 1
 
Html notes
Html notesHtml notes
Html notes
 
html.pptx
html.pptxhtml.pptx
html.pptx
 
HTML.pdf
HTML.pdfHTML.pdf
HTML.pdf
 
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
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Html
HtmlHtml
Html
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Html basics
Html basicsHtml basics
Html basics
 
HTML_Basics.pdf
HTML_Basics.pdfHTML_Basics.pdf
HTML_Basics.pdf
 
Html basics
Html basicsHtml basics
Html basics
 
Html basics
Html basicsHtml basics
Html basics
 
Html basics
Html basicsHtml basics
Html basics
 
Html basics
Html basicsHtml basics
Html basics
 
Html basic file
Html basic fileHtml basic file
Html basic file
 
Html basics
Html basicsHtml basics
Html basics
 

Mais de Universitas Pendidikan Indonesia (6)

Lm301 t05 12-4563_upaya preservasi terhadap data laptop pribadi
Lm301 t05 12-4563_upaya preservasi terhadap data laptop pribadiLm301 t05 12-4563_upaya preservasi terhadap data laptop pribadi
Lm301 t05 12-4563_upaya preservasi terhadap data laptop pribadi
 
Gaya Kepemimpinan
Gaya KepemimpinanGaya Kepemimpinan
Gaya Kepemimpinan
 
3. tipe dan fungsi kepemimpinan!
3. tipe dan fungsi kepemimpinan!3. tipe dan fungsi kepemimpinan!
3. tipe dan fungsi kepemimpinan!
 
bahaya banjir di indonesia
bahaya banjir di indonesia bahaya banjir di indonesia
bahaya banjir di indonesia
 
html 4
html 4html 4
html 4
 
belajar HTML 3
belajar HTML 3belajar HTML 3
belajar HTML 3
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 

Último (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 

belajar HTML

  • 2. HTML HEADINGS Headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading. Example : Note: Browsers automatically add some empty space (a margin) before and after each heading. Apep Kamaludin, MT. | http://www.w3schools.com <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
  • 3. HTML HEADINGS Headings Are Important Use HTML headings for headings only. Don't use headings to make text BIG or bold. Search engines use your headings to index the structure and content of your web pages. Since users may skim your pages by its headings, it is important to use headings to show the document structure. H1 headings should be used as main headings, followed by H2 headings, then the less important H3 headings, and so on. Apep Kamaludin, MT. | http://www.w3schools.com
  • 4. HTML HEADINGS HTML Lines The <hr>tag creates a horizontal line in an HTML page. The hr element can be used to separate content: Example : Apep Kamaludin, MT. | http://www.w3schools.com <p>This is a paragraph</p> <hr><p>This is a paragraph</p> <hr><p>This is a paragraph</p>
  • 5. HTML HEADINGS HTML Comments Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. Comments are written like this: Example Note: There is an exclamation point after the opening bracket, but not before the closing bracket. Apep Kamaludin, MT. | http://www.w3schools.com <!-- This is a comment -->
  • 6. HTML HEADINGS HTML Tip - How to View HTML Source Have you ever seen a Web page and wondered "Hey! How did they do that?" To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page. Apep Kamaludin, MT. | http://www.w3schools.com
  • 7. HTML HEADINGS 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. Apep Kamaludin, MT. | http://www.w3schools.com Tag Description <html> Defines an HTML document <body> Defines the document's body <h1> to <h6> Defines HTML headings <hr> Defines a horizontal line <!--> Defines a comment
  • 8. HTML PARAGRAPHS Paragraphs are defined with the <p> tag. Example Note: Browsers automatically add an empty line before and after a paragraph. Apep Kamaludin, MT. | http://www.w3schools.com <p>This is a paragraph</p> <p>This is another paragraph</p>
  • 9. HTML PARAGRAPHS Don't Forget the End Tag Most browsers will display HTML correctly even if you forget the end tag: Example The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors. Note: Future version of HTML will not allow you to skip end tags. Apep Kamaludin, MT. | http://www.w3schools.com <p>This is a paragraph <p>This is another paragraph
  • 10. HTML PARAGRAPHS HTML Line Breaks Use the <br> tag if you want a line break (a new line) without starting a new paragraph: Example : The <br> element is an empty HTML element. It has no end tag. Apep Kamaludin, MT. | http://www.w3schools.com <p>This is<br>a para<br>graph with line breaks</p>
  • 11. HTML PARAGRAPHS <br> or <br /> In XHTML and XML, elements with no end tag (closing tag) are not allowed. Both <br> and <br />works in all HTML browsers, but for XHTML and XML applications you must use <br />. Apep Kamaludin, MT. | http://www.w3schools.com
  • 12. HTML PARAGRAPHS HTML Output - Useful Tips 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 lines count as one line, and any number of spaces count as one space. Apep Kamaludin, MT. | http://www.w3schools.com
  • 13. HTML TEXT FORMATTING This text is bold This text is big This text is italic This is computer output This is subscript and superscript Apep Kamaludin, MT. | http://www.w3schools.com
  • 14. HTML TEXT FORMATTING HTML Formatting Tags HTML uses tags like <b> and <i> for formatting output, like bold or italic text. These HTML tags are called formatting tags (look at the bottom of this page for a complete reference). Apep Kamaludin, MT. | http://www.w3schools.com Often <strong> renders as <b>, and <em> renders as <i>. However, there is a difference in the meaning of these tags: <b> or <i> defines bold or italic text only. <strong> or <em> means that you want the text to be rendered in a way that the user understands as "important". Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a text highlighted with the strong feature, it might be cursive for example and not bold!
  • 15. HTML TEXT FORMATTING Tag Description <b> Defines bold text <big> Defines big text <em> Defines emphasized text <i> Defines a part of text in an alternate voice or mood <small> Defines small text <strong> Defines strong text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text Apep Kamaludin, MT. | http://www.w3schools.com HTML Text Formatting Tags
  • 16. HTML TEXT FORMATTING Tag Description <code> Defines computer code text <kbd> Defines keyboard text <samp> Defines sample computer code <tt> Defines teletype text <var> Defines a variable <pre> Defines preformatted text Apep Kamaludin, MT. | http://www.w3schools.com HTML "Computer Output" Tags
  • 17. HTML TEXT FORMATTING Tag Description <abbr> Defines an abbreviation <acronym> Defines an acronym <address> Defines contact information for the author/owner of a document <bdo> Defines the text direction <blockquote> Defines a section that is quoted from another source <q> Defines an inline (short) quotation <cite> Defines the title of a work <dfn> Defines a definition term Apep Kamaludin, MT. | http://www.w3schools.com HTML Citations, Quotations, and Definition Tags
  • 18. HTML LINKS Links are found in nearly all Web pages. Links allow users to click their way from page to page. HTML Hyperlinks (Links) A hyperlink (or link) is a word, group of words, or image that you can click on to jump to a new document or a new section within the current document. When you move the cursor over a link in a Web page, the arrow will turn into a little hand. Links are specified in HTML using the <a> tag. The <a> tag can be used in two ways: 1. To create a link to another document, by using the href attribute 2. To create a bookmark inside a document, by using the name attribute Apep Kamaludin, MT. | http://www.w3schools.com
  • 19. HTML LINKS HTML Link Syntax The HTML code for a link is simple. It looks like this: The href attribute specifies the destination of a link. Example which will display like this: Visit W3Schools Clicking on this hyperlink will send the user to W3Schools' homepage. Tip: The "Link text" doesn't have to be text. It can be an image or any other HTML element. Apep Kamaludin, MT. | http://www.w3schools.com <a href="url">Link text</a> <a href="http://www.w3schools.com/">Visit W3Schools</a>
  • 20. HTML LINKS HTML Links - The target Attribute The target attribute specifies where to open the linked document. The example below will open the linked document in a new browser window or a new tab: Example Apep Kamaludin, MT. | http://www.w3schools.com <a href="http://www.w3schools.com/" target="_blank">Visit W3Schools!</a>
  • 21. HTML LINKS HTML Links - The name Attribute The name attribute specifies the name of an anchor. The name attribute is used to create a bookmark inside an HTML document. Note: The upcoming HTML5 standard suggests using the id attribute instead of the name attribute for specifying the name of an anchor. Using the id attribute actually works also for HTML4 in all modern browsers. Bookmarks are not displayed in any special way. They are invisible to the reader. Apep Kamaludin, MT. | http://www.w3schools.com
  • 22. HTML LINKS Example A named anchor inside an HTML document: Create a link to the "Useful Tips Section" inside the same document: Or, create a link to the "Useful Tips Section" from another page: Apep Kamaludin, MT. | http://www.w3schools.com <a name="tips">Useful Tips Section</a> <a href="#tips">Visit the Useful Tips Section</a> <a href="http://www.w3schools.com/html_links.htm#tips"> Visit the Useful Tips Section</a>
  • 23. HTML LINKS Basic Notes - Useful Tips Note: Always add a trailing slash to subfolder references. If you link like this: href="http://www.w3schools.com/html", you will generate two requests to the server, the server will first add a slash to the address, and then create a new request like this: href="http://www.w3schools.com/html/". Tip: Named anchors are often used to create "table of contents" at the beginning of a large document. Each chapter within the document is given a named anchor, and links to each of these anchors are put at the top of the document. Apep Kamaludin, MT. | http://www.w3schools.com
  • 24. HTML <HEAD> The HTML <head> Element The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more. The following tags can be added to the head section: <title>, <base>, <link>, <meta>, <script>, and <style>. Apep Kamaludin, MT. | http://www.w3schools.com
  • 25. HTML <HEAD> The HTML <title> Element The <title> tag defines the title of the document. The title element is required in all HTML/XHTML documents. The title element: defines a title in the browser toolbar provides a title for the page when it is added to favorites displays a title for the page in search-engine results A simplified HTML document: Apep Kamaludin, MT. | http://www.w3schools.com <!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html>
  • 26. HTML <HEAD> The HTML <base> Element The <base> tag specifies a default address or a default target for all links on a page: Apep Kamaludin, MT. | http://www.w3schools.com <head> <base href="http://www.w3schools.com/images/"><base target="_blank"> </head>
  • 27. HTML <HEAD> The HTML <link> Element The <link> tag defines the relationship between a document and an external resource. The <link> tag is most used to link to style sheets: Apep Kamaludin, MT. | http://www.w3schools.com <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head>
  • 28. HTML <HEAD> The HTML <style> Element The <style> tag is used to define style information for an HTML document. Inside the style element you specify how HTML elements should render in a browser: Apep Kamaludin, MT. | http://www.w3schools.com <head> <style type="text/css"> body {background-color:yellow} p {color:blue} </style> </head>
  • 29. HTML <HEAD> The HTML <meta> Element Metadata is information about data. The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine readable. Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata. The <meta> tag always goes inside the head element. The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. Apep Kamaludin, MT. | http://www.w3schools.com
  • 30. HTML <HEAD> Keywords for Search Engines Some search engines will use the name and content attributes of the meta element to index your pages. The following meta element defines a description of a page: The following meta element defines keywords for a page: The intention of the name and content attributes is to describe the content of a page. Apep Kamaludin, MT. | http://www.w3schools.com <meta name="keywords" content="HTML, CSS, XML"> <meta name="description" content="Free Web tutorials on HTML, CSS, XML">
  • 31. HTML <HEAD> The HTML <script> Element The <script> tag is used to define a client-side script, such as a JavaScript. The script element will be explained in a later chapter. Apep Kamaludin, MT. | http://www.w3schools.com
  • 32. HTML <HEAD> HTML head Elements Apep Kamaludin, MT. | http://www.w3schools.com Tag Description <head> Defines information about the document <title> Defines the title of a document <base> Defines a default address or a default target for all links on a page <link> Defines the relationship between a document and an external resource <meta> Defines metadata about an HTML document <script> Defines a client-side script <style> Defines style information for a document
  • 33. HTML STYLES - CSS CSS (Cascading Style Sheets) is used to style HTML elements. Apep Kamaludin, MT. | http://www.w3schools.com Look! Styles and colors This text is in Verdana and red This text is in Times and blue This text is 30 pixels high
  • 34. HTML STYLES - CSS Styling HTML with CSS CSS was introduced together with HTML 4, to provide a better way to style HTML elements. CSS can be added to HTML in the following ways: • Inline - using the style attribute in HTML elements • Internal - using the <style> element in the <head> section • External - using an external CSS file The preferred way to add CSS to HTML, is to put CSS syntax in separate CSS files. However, in this HTML tutorial we will introduce you to CSS using the style attribute. This is done to simplify the examples. It also makes it easier for you to edit the code and try it yourself. Apep Kamaludin, MT. | http://www.w3schools.com
  • 35. HTML STYLES - CSS Inline Styles An inline style can be used if a unique style is to be applied to one single occurrence of an element. To use inline styles, use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example below shows how to change the text color and the left margin of a paragraph: Apep Kamaludin, MT. | http://www.w3schools.com <p style="color:blue;margin-left:20px;">This is a paragraph.</p>
  • 36. HTML STYLES - CSS HTML Style Example - Background Color The background-color property defines the background color for an element: Example Apep Kamaludin, MT. | http://www.w3schools.com <!DOCTYPE html> <html> <body style="background-color:yellow;"> <h2 style="background-color:red;">This is a heading</h2> <p style="background-color:green;">This is a paragraph.</p> </body> </html>
  • 37. HTML STYLES - CSS HTML Style Example - Font, Color and Size The font-family, color, and font-size properties defines the font, color, and size of the text in an element: Example Apep Kamaludin, MT. | http://www.w3schools.com <!DOCTYPE html> <html> <body> <h1 style="font-family:verdana;">A heading</h1> <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p> </body> </html>
  • 38. HTML STYLES - CSS HTML Style Example - Text Alignment The text-align property specifies the horizontal alignment of text in an element: Example Apep Kamaludin, MT. | http://www.w3schools.com <!DOCTYPE html> <html> <body> <h1 style="text-align:center;">Center-aligned heading</h1> <p>This is a paragraph.</p> </body> </html>
  • 39. HTML STYLES - CSS Internal Style Sheet An internal style sheet can be used if one single document has a unique style. Internal styles are defined in the <head> section of an HTML page, by using the <style> tag, like this: Apep Kamaludin, MT. | http://www.w3schools.com <head> <style type="text/css"> body {background-color:yellow;} p {color:blue;} </style> </head>
  • 40. HTML STYLES - CSS External Style Sheet An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the <head> section: Apep Kamaludin, MT. | http://www.w3schools.com <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head>