HTML Basic 📌
In this lecture, we are going to talk about some basic HTML example.
HTML Documents
- All HTML documents need to declare the document type. <!DOCTYPE html>
- All HTML documents start with <html> tag itself
- All HTML documents end with </html> tag itself
- All HTML document contains the visual part of the <body> tag
HTML Headings
- Headings are used to create a title for the HTML document.
- There are 6 types of heading h1 is the most important heading & h6 is the less important heading. h1
heading is also important from an SEO perspective.
<h1> Heading number 1</h1> <h2> Heading number 2</h2> <h3> Heading number 3</h3> <h4> Heading number 4</h4> <h5> Heading number 5</h5> <h6> Heading number 6</h6>
This is our code preview
-
Heading number 1
-
Heading number 2
-
Heading number 3
-
Heading number 4
-
Heading number 5
-
Heading number 6
-
HTML Paragraphs
HTML paragraphs are defined with the <p> tag
<p> This is a paragraph </p>
<p> This is a another paragraph </p>
HTML Links
HTML links are defined with the <a> tag
<a href="https://www.html.org.in"> This is a link </a>
- The link's destination is specified in the href attribute.
- Attributes are used to provide additional information about HTML elements.
- You will learn more about attributes in a later chapter.
HTML Images
HTML images are defined with the <img> tag
- We use (src) for source file.
- We use (alt) for alternative text.
- We use (width) for width of image.
- We use (height) for height of image.
- We use (title) for title of image.
<img src="html-org-in.png" alt="html.org.in" width="250" height="250" >
Html Media tag
- There are some special tags which are used to add Videos & Audios in your Html page!
- You can add videos in your HTML page using the <video> tag
<video controls>
<source src="your file.mp4">
</video>
- By the use of this tag you'll get some features in your video like:
- Play/Pause
- Volume
- Fullscreen
- etc.
- Similarly, you can add audios in your HTML page using the <audio> tag
<audio controls>
<source src="your file.mp3">
</audio>
- You'll get the same features like video, here too!