Image, Base, Figure, Figcaption Tags
<Image>
"Image" tag HTML ka ek non-text tag hai, jiska use images ko web pages me display karne ke liye kiya jata hai. Is tag ka use karne se, web page me image display hoti hai, jisse page ka content aur visually appealing aur informative ban jata hai.
"Image" tag ka use karne ke liye, image ke URL ko "src" attribute me specify kiya jata hai. For example, agar hum "example.jpg" image ko display karana chahte hain, to is tarah se likh sakte hain:
<img src="example.jpg" alt="Example Image">
lekin dhiyan rahe agar image aur apki html file ek hi jagah yani ek hi folder me hai to upar diye ho example k hisab se hi likhe lekin agar image kisi dusre folder me hai aur html file kisi dusre folder me hai to phele image ka location add karna hoga uske bad slash ("/") add karna hoga fir image ka naam and extension add karne par wo image web page par dikhegi.
example
<img src="path location/example.jpg" alt="Example Image">
Is code ko browser me render karne par, "example.jpg" image display hogi. "alt" attribute ka use karke, agar image load na ho to uski jagah text display kiya jata hai aur screen readers ke liye bhi accessibility provide karta hai.
"Image" tag ka use karke, hum image ke width, height, borders, and alignment ko bhi specify kar sakte hain, jisse image ko display karane ka better control mil jata hai.
example
<img src="example.jpg" alt="Example Image" width="100px" height="100px" border="5px" align="right">
width, height, border ki value likhne k liye hum pixel ka use karege k image humko kitne pixel me dikhe pixel ek unit hota hai k uski size hum kaise count kare.
Ye tag website development me bahut important hai, kyunki iske bina web pages me images ko display karna mushkil hota hai.
<Base>
"Base" tag HTML ka ek meta tag hai, jiska use web page ke base URL ko specify karne ke liye kiya jata hai. Example mostly kya hota hai k hum jab koi website banate hai to ek se zyada image use karte hai to sari image ka ek folder banate hai aur jayse k image tag me apne sikha the k agar image aur html file ek jagah nahi hai to image me location bhi add karna hota hai to aayse time par hum har image tag me location add nahi karege sirf base tag k andar internal link create kar lenge.
"Base" tag ka use karne ke liye, web page ke head section me "base" tag ko add kiya jata hai. "Base" tag ke "href" attribute me base URL ko specify kiya jata hai.
example
<head>
<base href="location/>
</head>
<body>
<img src="image1.extension">
<img src="image2.extension">
<img src="image3.extension">
<img src="image4.extension">
</body>
<figure> & <figcaption>
<figure> and <figcaption> are HTML tags used to provide a semantic structure to images and their accompanying captions.
The <figure> tag is used to group an image with its caption, and is typically used when an image is intended to be the main content of a page or article. The <figcaption> tag is used to provide a caption or description for the image.
Here's an example of how to use these tags:
<figure>
<img src="image.jpg" alt="A beautiful landscape">
<figcaption>Photo by Maulana Abdul Kalam</figcaption>
</figure>
In this example, the <figure> tag is used to group the <img> tag (which displays the image) and the <figcaption> tag (which provides a caption for the image). This helps to clearly associate the image with its caption, making it easier for users to understand the content of the page.
umeed hai apko sare tags ache se samaj me aay hoge
next lecture k liye humri blog ko follow karte rahe aur agar apko humara blog
pasand aaya to apne dosto se bhi share kare. milte hai next lecture k liye tab
tak k liye allahafiz
"HTML Unleashed: A Comprehensive Guide"
"Mastering HTML: From Basics to Beyond"
"HTML Essentials: Building the Web"
"HTML Demystified: Tag by Tag"
"The HTML Playground: Your Coding Hub"
"Unlocking the Web: HTML Explained"
"HTML Wizardry: Crafting Web Pages"
"HTML Insights: A Developer's Handbook"
"HTML Made Simple: Learn and Create"
"HTML Chronicles: Your Journey Begins Here"
"FOR MY CHANNEL" ❤️LIKE 💬COMMENT 🔗SHARE ❗🔥🔥🔥🔥SUBSCRIBE NOW 🔔PRESS THE BELL ICON FOR
NOTIFICATION
Comments