ID selector in CSS
In CSS, ID is used to style the element with the specified id. IDs are often used for objects that are unique in the website, each id name is unique to an element.
To declare ID in CSS, we use the following syntax:
#ten_id {
định dạng các thuộc tính CSS
}
For example:
#quantrimang {
background-color: black;
color: white;
font-size: 30px;
In HTML, the ID is open in the HTML tag with the syntax: id=ten_id
.
For example:
Website TipsMake.com
Note :
- ID can be used with any HTML element.
- ID names are only allowed to contain letters, numbers, underscores
_
, hyphens-
. ID names should not begin with numbers - ID values are case sensitive.
- ID value must contain at least 1 character and no spaces.
For example:
TECHNOLOGY VILLAGE
TECHNOLOGY
SCIENCE - LIFE
Result:
See more:
- Learn Basic CSS
- Learn Advanced CSS
4.5 ★ | 2 Vote
You should read it
May be interested
- Pseudo-Element in CSSpseudo-element in css is used to add special formats to a selector
- Class selector in CSSin css, class is used to style the element with the specified class.
- Pseudo-Class in CSSpseudo-class in css is used to add special effects to some selector.
- Can Pokemon Go be played on a computer? The answer is yes!by software emulation and additional software to support positioning, we can completely play pokemon go right on the computer, comfortable catching pokemon without worrying about running out of battery when playing as on the phone.
- Summary - How to play Pokemon GO, virtual reality game catch Pokemon on smartphonepokemon go game (styled, raising and training virtual animals) has become popular, the online community with new movements also immediately responded to this mobile game in the direction positive direction
- Things you didn't know about 26 types of Pokeball - Part 2to be able to catch pokemon, players need to use pokeball. the higher the ball, the higher the success rate of pokemon
- Stardust's effective way in Pokemon GOpokemon go stardust is used to evolve pokemom with candy. therefore, if there is more stardust, it will make the evolution easier.
- AZ word about eggs in Pokemon Gothere are many different pokemon eggs that can hatch into many pokemon, but to make these eggs hatch into pokemon, you will have to perform some tasks. each player begins with an egg incubator, which allows the user to incubate an egg after performing certain steps, gps and pedometer tracking on the mobile device of you and the game.
- Things you didn't know about 26 types of Pokéball - Part 1pokéball is the most important item in pokémon go, allowing gamers to quickly catch pokémon back to their team. the higher the pokéball, the more effective the ability to catch pokémon.
- 10 tips to help you become a great Pokemon trainerin the article below, tipsmake.com will introduce to you some tips to easily become a great trainer in this pokemon go game offline ...