- Introduction To HTML
- HTML Elements And Tags
- HTML Basic Examples
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Formatting Elements
- HTML Quotation
- HTML Comments
- HTML Colors
- HTML Styles - CSS
- HTML Links
- HTML Images
- HTML Tables
- HTML Lists
- HTML Block And Inline
- HTML Class
- HTML Id
- HTML Iframes
- HTML JavaScript
- HTML File Paths
- HTML Head
- HTML Layout
- HTML Responsive
- HTML Computer Code
- HTML Semantic
- HTML Forms
- HTML Form Attributes
- HTML Form Elements
- HTML Input Types
- HTML Input Attributes
- HTML Input Form Attributes
- HTML Canvas
- HTML SVG
- HTML Media
- HTML Video
- HTML Audio
- HTML YouTube
HTML Basic Examples
HTML Documents
In this chapter, we'll show some basic HTML examples.
Don't worry if we use tags that you are not yet familiar with.
<html>
<title>Page Title Name</title>
<body>
<h1>This is a First Heading</h1>
<p>This is a First Paragraph.</p>
</body>
</html>
The Declaration
Browsers use the <!DOCTYPE>
declaration, which represents the document type, to display web pages properly.
It only needs to appear once at the top of the page (before any HTML tags).
There is no case distinction in <!DOCTYPE>
declaration.
HTML5's <!DOCTYPE>
declaration is as follows:
HTML Headings
The <h1>
to <h6>
tags in HTML are used to define headings.
The most significant heading is defined by <h1>. The smallest heading is indicated by the tag <h6>
<h2>This is a Heading Two</h2>
<h3>This is a Heading Three</h3>
<h4>This is a Heading Four</h4>
<h5>This is a Heading Five</h5>
<h6>This is a Heading Six</h6>
HTML Paragraphs
HTML paragraphs are defined with the <p>
tag:
<p>This is a Second Paragraph</p>
HTML Links
The <a>
tag is used to define links in HTML.
The href parameter defines the link's destination.
To give more details about HTML elements, attributes are used.
In a subsequent chapter, you will learn more about characteristics.
HTML Images
The <img>
tag is used to define HTML images.
The attributes width, height, alternate text (alt), and source file (src) are as follows:
How To View HTML Source?
Have you ever viewed a website and thought "Hey! How did they manage that?"
View HTML Source Code:
In Chrome or Edge, right-click on an HTML page and choose "View Page Source" or "View Source," respectively. Similar options may be available in other browsers. This will launch a window containing the page's HTML source code.
Inspect an HTML Element:
To inspect the components of an HTML element, right-click on it (or a blank space) and select "Inspect" or "Inspect Element" (you will see both the HTML and the CSS). Additionally, the Elements or Styles panel that appears allows you to instantly alter the HTML or CSS.
Products
Partner
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP