HTML Lesson 1
HTML Lesson 1
• HTML Editors
• HTML Basic Examples
➢ HTML Documents
➢ The <!DOCTYPE> Declaration
➢ HTML Headings
➢ HTML Paragraphs
➢ HTML Links
➢ HTML Images
➢ View HTML Source Code
➢ Inspect an HTML Element
Ph No :+91-7290934405
HTML Introduction
HTML is the standard markup language for creating Web pages.
What is HTML?
• HTML stands for Hyper Text Markup Language
• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.
</body>
</html>
Note: Some HTML elements have no content (like the <br> element). These elements are
called empty elements. Empty elements do not have an end tag!
Web Browsers
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display
them correctly.
A browser does not display the HTML tags, but uses
them to determine how to display the document:
HTML History
Since the early days of the World Wide Web, there have been many versions of HTML:
Year Version Year Version
1989 Tim Berners-Lee invented www 2008 WHATWG HTML5 First Public Draft
1991 Tim Berners-Lee invented HTML 2012 WHATWG HTML5 Living Standard
1995 HTML Working Group defined HTML 2.0 2016 W3C Candidate Recommendation: HTML 5.1
1997 W3C Recommendation: HTML 3.2 2017 W3C Recommendation: HTML5.1 2nd Edition
Tip: You can use either .htm or .html as file extension. There is no difference; it is up to you.
It is the perfect tool when you want to test code fast. It also has color
coding and the ability to save and share code with others.
HTML Basic Examples
In this chapter we will show some basic HTML examples.
Don't worry if we use tags you have not learned about yet.
HTML Documents
All HTML documents must start with a document 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>.
Example
The <!DOCTYPE> Declaration
<!DOCTYPE html>
<html> • represents the document type, and helps browsers to display web pages
<body> correctly.
<h1>My First Heading</h1>
• It must only appear once, at the top of the page (before any HTML tags).
<p>My first paragraph.</p>
</body> • is not case sensitive.
</html> • for HTML5 is: <!DOCTYPE html>