This forum is now read-only. Please use our new forums! Go to forums
Can someone explain to me how this code works
id=’myID’ class=’myClass’>
i don’t completly understand what the id bit and the class bit does help please
Answer 5141627b6bb9ad50c0003708
The difference is ‘Single” vs “Many”.
ID’s are single use and are only applied to one element. They are used to identify a single element.
Classes can be used more than once. They can therefore be applied to more than one element, and more than once per element.
ID’s will work but when your ready to go validate your code with W3 Schools it will give your error warnings.
Only 1 ID to a element, but a element can have multiple Classes
<div id="myID" class="myFirstclass mySecondclass myThirdclass">
Answer 5225c324f10c60afb7006727
It would be best to show your code for HTML and CSS tabs however I can guess that you did not make an HTML element with the class fancy and then use CSS to apply the cursive font to it. For instance this would make a paragraph element with the class of “fancy”
<p class="fancy">This is cursive!</p>
which then we can style in CSS by selecting the class with the syntax “.[classname]” like so:
.fancy {
font-family: cursive;
color: #0000CD;
}
1 comments
Answer 513e6ccb4360cb42a900051e
Answer 5140bd2810737088c1000658
From the examples and tests are the example names of intro, standout, just examples and you can use anything you want to describe it? Most of the times i put in my own word and then used that world in the CSS file to reference it, everything worked as it should.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments