Write any 5 tags with their attributes in HTML . also explain all tags with examples
Answers
Answer:
Hyper Text Markup Language
Explanation:
1. BODY TAG : <body>
The body tag is used to open the HTML web page's body.
Attributes:
- Background color (bgcolor) :- The bgcolor attribute lets you specify a background color for your webpage.
Syntax: <body bgcolor = "yellow">
- Background :- This attribute lets you insert an image of your choice as the background of your web page. You only have to specify the image's location on your PC.
Syntax: <body background = "image/location/">
- Link :- The link attribute is used to specify the color of every hyperlink in your html document.
Syntax: <body link = "blue">
- alink :- It is used to specify the colour of an active link in your web page.
Syntax: <body alink = "red">
- vlink :- It is used to specify the colour of a link you have already visited.
Syntax: <body vlink = "purple">
NOTE: There is a *Text* attribute also for he body tag, but I haven't mentioned it, since we can change the text color using font tag any time.
2. FONT TAG :- The font tag is used to format your text's font anytime in the web page.
Attributes:
- Size :- This attribute is used to change the font size. To get to the original font size, just close the font tag.
Syntax: <font size = "size">
- Color :- This attribute is used to change the font's colour.
Syntax: <font color = "pink">
- Face :- The face attribute is used to change the font style.
Syntax: <font face ="cambiria">
3. MARQUEE TAG :- This tag is used to give special effects to the text.
Attributes:
- Behavior :- It defines the type of scrolling. There are 3 types of them - scroll, slide and alternate.
Syntax: <marquee behaviour = "scroll">
- Bgcolor :- Defines the background color of the text.
Syntax: <marquee bgcolor = "green">
- Direction :- Defines he direction of the scrolling text.
Syntax: <marquee direction = "right">
- Height :- Defines the height of marquee.
Syntax: <marquee height = "30%">
- Hspace, width and vspace :- For these 3 tags, as the name suggests, it is actually used to specify magnitude for area of marquee. Syntax is same. You have to mention number of pixels as the value.
- Loop, scrolldelay, and scrollamount :- Loop is used to specify the number of loops for marquee, by default, number of loops is infinite. Scrolldelay and scrollamount tags define how long to delay b/w each jump and how far to jump respectively. Syntax's the same friend.
4. IMAGE TAG (img) :- This tag is used to insert an image in the web page.
Attributes:
- Source (src) :- This attribute is used to define the source or the location of the image you want to insert.
Syntax: <img src = "l/o/c/a/t/i/o/n">
- Border and Bordercolor: - Define the border size and color of the image.
Syntax: <img border = "3" , bordercolor = "red">
- Alternate (alt) :- It is a very useful attribute. It is used to display an alternate message, in case your inserted image cannot be displayed due to some reason.
Syntax: <img alt = "Sorry, image could not be loaded">
- Width and height :- As the name suggests, they are used to change image size.
Syntax: <img width = "600" height = "1000">
NOTE: The above mentioned are the most commonly used img tag attributes. I have not mentioned the rare ones. Writing this much will give you full marks buddy!
5. ANCHOR TAG (a) :- This tag is used for external and internal linking in your HTML document.
Attributes:
- Hyperlink reference (href) :- It is used to specify the linked document's source or location.
Syntax: <a href = "l/o/c/a/t/i/o/n">Click me</a>
Output: Click Me .... When you click on it you will be taken to the located source.
Actually you have to write the link name b/w the location and closing anchor tag. :- <a href = "x/y/z"> name </a>
- Title tag :- Used to define the title of a link, which appears to the user as a tooltip. Syntax: Exactly the same as rest.
Soooo....phew..!
This was my explanation. Believe me I have written it all myself in 1 and a half hours.
Thank You friend for asking me such a question...
I hope my efforts will be marked as the brainliest!
Thank You once again!
</html> :)