In this chapter we will show some basic HTML examples.
Don’t worry if we use tags you have not learned about yet.
All HTML reports should begin with an archive type declaration: <!DOCTYPE html>.
The HTML record itself starts with <html> and closes with </html>.
The noticeable piece of the HTML record is between <body> and </body>.
<h1>My First Heading</h1>
<p>My first paragraph.</p>
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration speaks to the report type, and encourages programs to show pages accurately.
It should just show up once, at the highest point of the page (before any HTML labels).
The <!DOCTYPE> declaration isn’t case touchy.
The <!DOCTYPE> declaration for HTML5 is:
HTML headings are defined with the
<h1> defines the most important heading.
<h6> defines the least important heading:
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
HTML paragraphs are defined with the
<p>This is another paragraph.</p>
HTML links are defined with the
The connection’s objective is determined in the href attribute.
Traits are utilized to give extra information about HTML components.
You will become familiar with credits in a later section.
HTML images are defined with the
The source file (
src), alternative text (
height are provided as attributes:
How to View HTML Source?
Have you ever seen a Web page and wondered “Hey! How did they do that?”
View HTML Source Code:
Right-click in a HTML page and select “View Page Source” (in Chrome) or “View Source” (in Edge), or comparable in different programs. This will open a window containing the HTML source code of the page.
Inspect an HTML Element:
Right-click on a component (or a clear zone), and pick “Review” or “Investigate Element” to perceive what components are comprised of (you will see both the HTML and the CSS). You can likewise alter the HTML or CSS on-the-fly in the Elements or Styles board that opens.