HTML blockLOGIN

HTML block

HTML can combine elements through <div> and <span>.

Explain by:

<!Doctype html>
<html>
                                                                                                                                                                        "">
                                                                                                                                                                                                                                                                                            Refresh every 30 seconds-->
##      

 <div> and <span> in html can be used to inline elements with these two elements


 
 
 Most html Elements are defined as block-level elements or inline elements
Block-level elements usually start or end with a new line (column <br />) when displayed by the browser

Inline elements: < a>, <img>, <td>, <span>, <b> The <div> element is a block-level element, which can be used to combine other The html element container is used for document layout


The <div> element has no specific meaning. In addition, since it is a block-level element, the browser will display line breaks before and after it.



Another common use of the <div> element is in document layout. It replaces the old-fashioned way of using tables to define layouts. # & lt; Table & gt; The role of the element is to display table -based data. It is best not to use it for document layout

& lt; span & gt; When used with css, you can set part of the text style, which block to set

--> </body>

</html>



Next Section

<html> <head> <meta charset="utf-8"> <title>php.cn</title> </head> <body> 测试<span>紧跟前面的"测试"显示</span><div>这里会另起一行显示</div> </body> </html>
submitReset Code
ChapterCourseware