Classes are a great feature in HTML that allow elements to be given a certain name, and they can be styled using CSS. If you don’t know how to use these features, this article will introduce you to how to define CSS class styles. [Recommended learning: css tutorial]
1: What does css style do
CSS style It is the abbreviation of what we call Cascading Style Sheets, and we can also call it CSS for short.
CSS is a technology called stylesheet. Some people also call it Cascading Style Sheets. CSS layout is usually used to beautify web pages, which can also be called CSS styles.
2: How to define CSS class style
1 Make an HTML document.
2 Create the basic HTML structure, as a reminder, it is an opening HTML tag, an opening tag, an ending body tag and a closing html tag.
3. Create an HTML element. It can be a paragraph, heading or whatever you want to achieve.
4 Provide a class for the HTML element. Do this by inserting "class="classname" inside the opening tag of the element.
5. Add a "style" tag between the head tags.
6 By inserting a "style" tag in the CSS document Put ".classname {}" in to complete.
The above is a complete introduction to what does css style do? How to define CSS class style, if you want to know more about HTML online Manual, please pay attention to php Chinese website.
The above is the detailed content of What does css style do? How to define CSS class styles. For more information, please follow other related articles on the PHP Chinese website!