This article introduces to you about HTML5 attributes: code examples of select attributes, which have certain reference value. Friends in need can refer to them. I hope it will be helpful to you.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> /* 标签选择器 标签的名字{属性:值} */ p{ color: red; } /* 类选择器 点类的名字{属性:值} */ .second{ color: green; } /* 层级选择器 后代选择器 标签嵌套 父选择器 子选择器{属性:值} */ p p{ color: yellow; } </style> </head> <body> <p> p 标签 <p> 内嵌的标签</p> </p> <p>段落标记1</p> <p class="second"> 段落标记2</p> </body> </html>
Related recommendations:
HTML5 attribute: Usage example of margin attribute
HTML5 attribute: Usage of form attribute Example
The above is the detailed content of HTML5 attributes: code example for select attribute. For more information, please follow other related articles on the PHP Chinese website!