Intermediate HTML Welcome to the intermediate HTML section where we will be looking into the more complex parts of HTML that you will need to know to make websites. This includes the doc type and introducing the id and class attributes of tags. Ids and Classes Okay so now we move onto one of the most important parts of HTML declaring ids and classes. ids and classes are attributes inside HTML tags. So here is an example of one. <img width="100" height="100" src="#" id="myImage" /> now we have declared an id inside this image tag called myImage now with this we can use CSS to style this specific image as we have used an id to define it. <img width="100" height="100" src="#" class="myImages" /> Ids and classes are used with javascript and CSS to make some really cool things which we will look into later. Remember that if you assign something an id you cant assign it to something else if you want to do this assign a class instead. |