Home > Web Front-end > HTML Tutorial > How to create a chapter in an HTML document?

How to create a chapter in an HTML document?

王林
Release: 2023-09-05 20:25:13
forward
1591 people have browsed it

How to create a chapter in an HTML document?

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.

Example

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>
Copy after login

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;
}
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template