What is attributes?

AJ TECH BLOG
3

 Hello guys.. 

In this article we are discuss about attributes and some more tags used in HTML..

First we are discuss about main important tag for HTML 

<div>:- This is a tag which will store in a particular tags and bind those tags into a single tag.

How to use this tag? 

It is also a container tag which contains open and closing tag. In between these tag we are writing our code. This tag is mainly used for CSS (cascading style sheets). 


Syntax:-


<html> 

<body>

<div> 

<h1> Hello world </h1> 

<p> welcome to Aj Tech Blog</p> 

<article> some article placed here.. </article> 

</div> 

</body>

</html> 


The output is : 


Note:- Head tag is not mandatory in html but if need then head tag is compulsory.. 


For Now there is no difference while executing in browser. 

But by using some attributes we will see the difference.

First of all we are discuss about attributes. 


Attributes:- Attributes are gives extra information or styles to the tags. Without css we are able to give colors, alignments etc. are given to particular tags in html page by using attributes.

Some of the tags and their attributes we will discussing Now..


Syntax:-


<body attribute="value">


Note:- Only in opening tags we are writing attributes.. values are keywords used add design according to our need. 


bgcolor:- This attribute works in <body>, <article> <nav>, <div> etc., This tag is not works in heading tags (h1, h2, h3, h4, h5, h6) and paragraph tags. By using CSS we are adding styles to these tags. Values may be directly colors like aqua, pink, blue, black etc. or hexadecimal code or rgba color code also available in html.. 


What is Hexadecimal code?


It is a color code used to display colors.. 

The code is always starting with # 


Some of the color codes


Code Color names

#000000 Black (W3C)

#040720 Black Blue

#0C090A Night

#34282C Charcoal

#3B3131 Oil

#3A3B3C Dark Gray

#454545 Light Black

#413839 Black Cat

#3D3C3A Iridium

#463E3F Black Eel

#4C4646 Black Cow

#504A4B Gray Wolf

#565051 Vampire Gray

#52595D Iron Gray

#5C5858 Gray Dolphin

#625D5D Carbon Gray

#666362 Ash Gray

#696969 DimGray or DimGrey (W3C)

#686A6C Nardo Gray

#6D6968 Cloudy Gray

#726E6D Smokey Gray

#736F6E Alien Gray

#757575 Sonic Silver

#797979 Platinum Gray

#837E7C Granite

#808080 Gray or Grey (W3C)

#848482 Battleship Gray

#8C8C8C Dark Gainsboro

#8D918D Gunmetal Gray

#A9A9A9 DarkGray or DarkGrey (W3C)

#B6B6B4 Gray Cloud

#C0C0C0 Silver (W3C)

#C9C0BB Pale Silver

#D1D0CE Gray Goose

#CECECE Platinum Silver

#D3D3D3 LightGray or LightGrey (W3C)

#DADBDD Silver White

#DCDCDC Gainsboro (W3C)

#E5E4E2 Platinum

#BCC6CC Metallic Silver

#98AFC7 Blue Gray

#838996 Roman Silver

#778899 LightSlateGray or LightSlateGrey (W3C)

#708090 SlateGray or SlateGrey (W3C)

#6D7B8D Rat Gray

#657383 Slate Granite Gray

#616D7E Jet Gray

#646D7E Mist Blue

#566D7E Marble Blue

#737CA1 Slate Blue Grey

#728FCE Light Purple Blue

#4863A0 Azure Blue

#2F539B Estoril Blue

#2B547E Blue Jay

#36454F Charcoal Blue

#29465B Dark Blue Grey

#2B3856 Dark Slate

#123456 Deep-Sea Blue

#151B54 Night Blue

#191970 MidnightBlue (W3C)

#000080 Navy (W3C)

#151B8D Denim Dark Blue

#00008B DarkBlue (W3C)

#15317E Lapis Blue

#0000A0 New Midnight Blue

#0000A5 Earth Blue

#0020C2 Cobalt Blue

#0000CD MediumBlue (W3C)

#0041C2 Blueberry Blue

#2916F5 Canary Blue

#0000FF Blue (W3C)

#0002FF Samco Blue

#0909FF Bright Blue

#1F45FC Blue Orchid

#2554C7 Sapphire Blue

#1569C7 Blue Eyes

#1974D2 Bright Navy Blue

#2B60DE Balloon Blue

#4169E1 RoyalBlue (W3C)

#2B65EC Ocean Blue

#306EFF Blue Ribbon

#157DEC Blue Dress

#1589FF Neon Blue

#1E90FF DodgerBlue (W3C)

#368BC1 Glacial Blue Ice

#4682B4 SteelBlue (W3C)

#488AC7 Silk Blue

#357EC7 Windows Blue

#3090C7 Blue Ivy

#659EC7 Blue Koi

#87AFC7 Columbia Blue

#95B9C7 Baby Blue

#6495ED CornflowerBlue (W3C)

#6698FF Sky Blue Dress

#56A5EC Iceberg

#38ACEC Butterfly Blue

#00BFFF DeepSkyBlue (W3C)

#3BB9FF Midday Blue

#5CB3FF Crystal Blue

#79BAEC Denim Blue

#82CAFF Day Sky Blue

#87CEFA LightSkyBlue (W3C)

#87CEEB SkyBlue (W3C)

#A0CFEC Jeans Blue

#B7CEEC Blue Angel

#B4CFEC Pastel Blue

#ADDFFF Light Day Blue

#C2DFFF Sea Blue

#C6DEFF Heavenly Blue

#BDEDFF Robin Egg Blue

#B0E0E6 PowderBlue (W3C)

#AFDCEC Coral Blue

#ADD8E6 LightBlue (W3C)

#B0CFDE LightSteelBlue (W3C)

#C9DFEC Gulf Blue

#D5D6EA Pastel Light Blue

#E3E4FA Lavender Blue

#DBE9FA White Blue

#E6E6FA Lavender (W3C)

#EBF4FA Water

#F0F8FF AliceBlue (W3C)

#F8F8FF GhostWhite (W3C)

#F0FFFF Azure (W3C)

#E0FFFF LightCyan (W3C)

#CCFFFF Light Slate

#9AFEFF Electric Blue

#7DFDFE Tron Blue

#57FEFF Blue Zircon

#00FFFF Aqua or Cyan (W3C)

#0AFFFF Bright Cyan

#50EBEC Celeste

#4EE2EC Blue Diamond

#16E2F5 Bright Turquoise

#8EEBEC Blue Lagoon

#AFEEEE PaleTurquoise (W3C)

#CFECEC Pale Blue Lily

#B3D9D9 Light Teal

#81D8D0 Tiffany Blue

#77BFC7 Blue Hosta


You may try with other codes. There are nearly 1677216 codes in html.. 


what is rgba color code? 

rgba color code abbriviates red, green, blue and a means alpha 0.1 to 1(thickness of color) will be displayed in browser. 

it is color combination of three colors. But it is used in css. 


We need to use these hexadecimal codes and rgba color code while we know what color is exactly we know.. every color has minor differences. 


align:- align is a attribute is used to move the items into left, right or center or justify. But the default value is left. justify not used because it is seperate attribute in CSS


Example:-


<html> 

<body bgcolor="aqua"> 

<div>

<h1> Aj Tech Blog</h1>

<p align="center"> text will align center</p> 

</div> 

</body> 

</html> 


The output is : 


Please comment your opinion in comment section about our article 

Thanks for visiting.. 

Tags

Post a Comment

3Comments

Post a Comment