Blog Post Title
Blog post content goes here.
Click ★ if you like the project. Your contributions are heartily ♡ welcome.
SHORT NOTES is provided in this LINK
<header>
: Represents the introductory contents or a section for the site’s title, logo, navigation links or menu, etc.
<nav>
: Used for the navigation section containing links to other pages or parts of the website.
<section>
: Represents a standalone section of content, typically with a heading.
Information about our company.
<article>
: Represents self-contained content that can be independently distributable or reusable.
Blog post content goes here.
<aside>
: Used for content related to the surrounding content (like sidebars).
<footer>
: Defines the footer section for a document or section.
<main>
: Represents the main content of the body, excluding headers, footers, and sidebars.
Article content goes here.
<figure>
and <figcaption>
: Use a <figure>
element to mark up a photo in a document, and a <figcaption>
element to define a caption for the photo:
Input types
: new input types that provide better input validation and user experience.
placeholder
: The placeholder attribute allows you to provide hints or example values within input fields. It disappears when the user starts typing.
required
: The required attribute specifies that an input field must be filled out before submitting the form.
pattern
: The pattern attribute allows you to specify a regular expression pattern that the input value must match.
autocomplete
: The autocomplete attribute specifies whether a form field should have autocomplete functionality enabled or disabled.
<audio>
and <video>
elements allow developers to embed audio and video content directly into web pages.<audio>
: Embeds an audio file on a web page.
<video>
: Embeds a video file on a web page.
<source>
: Specifies alternative media resources for <audio>
and <video>
elements.
<track>
: Specifies timed text tracks, such as captions or subtitles, for <video>
and <audio>
elements.
<embed>
: Embeds external content, such as plugins or multimedia content, within an HTML document.
It supports drawing and animations directly on the web page.
<canvas>
: Used for rendering 2D graphics via JavaScript.
<canvas id="myCanvas" width="200" height="200"></canvas>
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" fill="blue" />
</svg>
<!DOCTYPE>
, <html>
, <head>
, and <body>
tags.<!DOCTYPE html>
declaration is the very first line of an HTML document. <!DOCTYPE html>
<html>
: The root element that contains all other elements of the HTML document.<head>
and <body>
sections. <html lang="en">
<!-- The rest of the document goes here -->
</html>
<head>
section contains meta-information about the document, which is not displayed on the page.Common elements within the <head>
include:
Meta Tags: Used to define the character set, viewport settings, author, and description of the document.
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Title: Defines the title displayed on the browser tab.
<title>Document Title</title>
Link Tags: Links to external resources like stylesheets and icons.
<link rel="stylesheet" href="styles.css">
<link rel="icon" href="favicon.ico">
Script Tags: Links to external JavaScript files, though it’s often recommended to place scripts at the end of the <body>
for better performance.
<script src="script.js" defer></script>
<body>
section contains the content that is rendered on the page, such as text, images, links, and forms. <body>
<!-- Visible content goes here -->
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Basic HTML Document Structure</title>
<link rel="stylesheet" href="styles.css">
<script src="script.js" defer></script>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a sample HTML document structure.</p>
</body>
</html>
<header>
, <footer>
, <article>
, <section>
, and <aside>
to give meaning to your content and improve accessibility.<head>
Properly: Ensure meta tags for character encoding and viewport settings are placed at the top of the <head>
section.defer
or async
attributes for external JavaScript files, or place them just before the closing </body>
tag for better page load performance.<html lang="en">
: Sets the language attribute for accessibility and SEO.<meta charset="UTF-8">
: Defines the character encoding to support most languages.<meta name="viewport" content="width=device-width, initial-scale=1.0">
: Ensures responsiveness by setting the viewport width to the device width.<title>
: Defines the page title, which is important for SEO and bookmarking.<link rel="stylesheet" href="styles.css">
: Links to the CSS file.<script src="script.js" defer></script>
: Links to an external JavaScript file without blocking page rendering (using defer
).