HTML Basic Examples

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

HTML Tutorial

HTML HOME
HTML Introduction
HTML Editors
HTML Basic
HTML Elements HTML Basic Examples
HTML Attributes
HTML Headings ❮ Previous Next ❯
HTML Paragraphs
HTML Styles
HTML Formatting In this chapter we will show some basic HTML examples.
HTML Quotations
Don't worry if we use tags you have not learned about yet.
HTML Comments
HTML Colors
HTML CSS
COLOR PICKER
HTML Links HTML Documents
HTML Images
All HTML documents must start with a document type declaration: <!DOCTYPE html> .
HTML Favicon
HTML Page Title
The HTML document itself begins with <html> and ends with </html> .
HTML Tables 
HTML Lists The visible part of the HTML document is between <body> and </body> .
HTML Block & Inline
HTML Classes
HTML Id Example
HTML Iframes
HTML JavaScript <!DOCTYPE html>
HTML File Paths <html>
<body>
HTML Head
HTML Layout
<h1>My First Heading</h1>
HTML Responsive
<p>My first paragraph.</p>
HTML Computercode
HTML Semantics </body>
HTML Style Guide </html>
HTML Entities
HTML Symbols Try it Yourself »
HTML Emojis
HTML Charset
HTML URL Encode
HTML vs. XHTML
The <!DOCTYPE> Declaration
HTML Forms
The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly.
HTML Forms
HTML Form Attributes It must only appear once, at the top of the page (before any HTML tags).
HTML Form Elements
HTML Input Types The <!DOCTYPE> declaration is not case sensitive.

HTML Input Attributes


The <!DOCTYPE> declaration for HTML5 is:
HTML Input Form Attributes

HTML Graphics
<!DOCTYPE html>
HTML Canvas
HTML SVG

HTML Media
HTML Media HTML Headings
HTML Video
HTML Audio HTML headings are defined with the <h1> to <h6> tags.

HTML Plug-ins
<h1> defines the most important heading. <h6> defines the least important heading: 
HTML YouTube

HTML APIs
Example
HTML Geolocation
HTML Drag/Drop <h1>This is heading 1</h1>
HTML Web Storage <h2>This is heading 2</h2>
HTML Web Workers <h3>This is heading 3</h3>
HTML SSE

Try it Yourself »
HTML Examples
HTML Examples
HTML Editor
HTML Quiz
HTML Exercises
HTML Bootcamp
HTML Paragraphs
HTML Certificate
HTML Summary HTML paragraphs are defined with the <p> tag:
HTML Accessibility

HTML References Example


HTML Tag List
HTML Attributes <p>This is a paragraph.</p>
HTML Global Attributes
<p>This is another paragraph.</p>

Try it Yourself »

HTML Tutorial
HTML HOME
HTML Introduction HTML Links
HTML Editors
HTML Basic HTML links are defined with the <a> tag:
HTML Elements
HTML Attributes
HTML Headings Example
HTML Paragraphs
HTML Styles <a href="https://www.w3schools.com">This is a link</a>
HTML Formatting
HTML Quotations Try it Yourself »
HTML Comments
HTML Colors
HTML CSS The link's destination is specified in the href attribute. 
HTML Links
HTML Images Attributes are used to provide additional information about HTML elements.
HTML Favicon
You will learn more about attributes in a later chapter.
HTML Page Title
HTML Tables
HTML Lists
HTML Block & Inline HTML Images
HTML Classes
HTML images are defined with the <img> tag.
HTML Id
HTML Iframes The source file ( src ), alternative text ( alt ), width , and height are provided as attributes:
HTML JavaScript
HTML File Paths
HTML Head Example
HTML Layout
HTML Responsive <img src="w3schools.jpg" alt="W3Schools.com" width="104" height="142">
HTML Computercode
HTML Semantics Try it Yourself »
HTML Style Guide
HTML Entities
HTML Symbols
HTML Emojis
HTML Charset How to View HTML Source
HTML URL Encode
HTML vs. XHTML Have you ever seen a Web page and wondered "Hey! How did they do that?"

HTML Forms View HTML Source Code:


HTML Forms
Right-click in an HTML page and select "View Page Source" (in Chrome) or "View Source" (in Edge), or similar in other browsers. This
HTML Form Attributes will open a window containing the HTML source code of the page.
HTML Form Elements
HTML Input Types Inspect an HTML Element:
HTML Input Attributes
HTML Input Form Attributes Right-click on an element (or a blank area), and choose "Inspect" or "Inspect Element" to see what elements are made up of (you
will see both the HTML and the CSS). You can also edit the HTML or CSS on-the-fly in the Elements or Styles panel that opens.
HTML Graphics
HTML Canvas
HTML SVG
❮ Previous Log in to track progress Next ❯

HTML Media
HTML Media
HTML Video
HTML Audio
HTML Plug-ins Spaces Upgrade Newsletter Get Certified Report Error
HTML YouTube

HTML APIs
Top Tutorials Top References Top Examples Get Certified
HTML Geolocation
HTML Tutorial HTML Reference HTML Examples HTML Certificate
HTML Drag/Drop CSS Tutorial CSS Reference CSS Examples CSS Certificate
HTML Web Storage JavaScript Tutorial JavaScript Reference JavaScript Examples JavaScript Certificate
How To Tutorial SQL Reference How To Examples Front End Certificate
HTML Web Workers
SQL Tutorial Python Reference SQL Examples SQL Certificate
HTML SSE Python Tutorial W3.CSS Reference Python Examples Python Certificate
W3.CSS Tutorial Bootstrap Reference W3.CSS Examples PHP Certificate
Bootstrap Tutorial PHP Reference Bootstrap Examples jQuery Certificate
HTML Examples PHP Tutorial HTML Colors PHP Examples Java Certificate
Java Tutorial Java Reference Java Examples C++ Certificate
HTML Examples
C++ Tutorial Angular Reference XML Examples C# Certificate
HTML Editor jQuery Tutorial jQuery Reference jQuery Examples XML Certificate
HTML Quiz
HTML Exercises
FORUM | ABOUT
HTML Bootcamp
HTML Certificate W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we
cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.
HTML Summary
HTML Accessibility Copyright 1999-2023 by Refsnes Data. All Rights Reserved.
W3Schools is Powered by W3.CSS.

HTML References
HTML Tag List 
HTML Attributes
HTML Global Attributes

You might also like