Use the tag to add a section to the document. HTML tags are used to define a portion of a document. Using div tags, you can group most of your HTML elements together and format them using CSS.
You can try to create a section using the following code -
<!DOCTYPE html> <html> <head> <title>HTML div Tag</title> <link rel = "stylesheet" href = "style2.css"> </head> <body> <div id = "contentinfo"> <p>Welcome to our website. We provide tutorials on various subjects.</p> </div> </body> </html>
The following is the css file style2.css
#contentinfo p { line-height: 20px; margin: 30px; padding-bottom: 20px; text-align: justify; width: 140px; color: red; }
The above is the detailed content of How to create a chapter in an HTML document?. For more information, please follow other related articles on the PHP Chinese website!