Assignment 02
Structure and interpretation of HTML page
The entire context of HTML is included in the <html></html>
(Also known as the root element
).
Inside the root element, there are two elements:
<head></head>
<body></body>
Therefore a typical HTML document should look like:
实例
<html> <head> <!-- Head parts here --> </head> <body> <!-- Body parts here --> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
3 General attribution of HTML element
id=''
class=''
style=''
We can select and obtain one particular element using
id=''.
We can select and obtain a kind of elements using class=''
.
We can change the style of an element using style=''
.
MISCS
Different selectors have different priority levels. Usually style='' > id='' > class=''