HTML: The Basics
If you have looked at a WordPress template file, then you will already know that they are written in PHP format and contain a tonne of HTML. This includes HTML elements such as <div>, <h1> to <h6>, <p>, <ul> and <ol>. With these HTML elements, you can create a basic site structure. Although this is very basic, it gives you an idea of what websites look like in the beginning. HTML has increasingly become more and more complex as time as went on as the presentation of websites has grown. With each new version of the markup language, more capabilities were added to the style documents. Although the end product is far better, the code has become much more complex and difficult to both read and write. With any styling, you must use the inline style=’’ which can make the code appear confusing to read. So, this means that If you want to make design changes you need to go through each instance individually. Luckily, there is a way around this.
Definition of HTML Classes and IDS
The hook that is attached to HTML elements to make them more precise is called HTML classes and IDS. You will also have extra identifiers to allocate CSS markup to. You can use both the ID and classes here as they work in a similar way.
When to Use HTML Class and IDS
So, now you need to know when to use classes and when to use IDS. While they are very similar and similar function, there are some differences. The main difference between the two is that you should use ID for a single, unique element, while classes are not unique ad can be used for multiple elements.
Why Is This Important?