Create Your First Web Page With Bootstrap 5 ALLE ANLEITUNGEN SIND DER FOLGENDEN TRAININGSSEITE ENTNOMMEN: https://www.w3schools.com/bootstrap5/index.php Viel Spaß beim Training 1. Add the HTML5 doctype Bootstrap 5 uses HTML elements and CSS properties that require the HTML5 doctype. Always include the HTML5 doctype at the beginning of the page, along with the lang attribute and the correct title and character set:
This part is inside a .container class.
The .container class provides a responsive fixed width container.
Resize the browser window to see that the container width will change at different breakpoints.
This part is inside a .container-fluid class.
The .container-fluid class provides a full width container, spanning the entire width of the viewport.
This container has an extra top padding.
Try to remove the .pt-5 class to see the difference.
This container has NO extra top padding.
Try to remove the .pt-5 class to see the difference.
This container has a border and some extra padding and margins.
This container has a dark background color and a white text, and some extra padding and margins.
This container has a blue background color and a white text, and some extra padding and margins.
Resize the browser window to see the effect.
Note: Try to add a new div with class="col" inside the row class - this will create four equal-width columns.
Note: Try to add a new div with class="col" inside the row class - this will create four equal-width columns.
Resize the browser window to see the effect.
The columns will automatically stack on top of each other when the screen is less than 576px wide.
Resize the browser window to see the effect.
The columns will automatically stack on top of each other when the screen is less than 576px wide.
elements have margin-top: 0 and margin-bottom: 1rem (16px by default).
The font-size of each Bootstrap heading depends on the screen size. Try to resize the browser window to see the effect.
h1 Bootstrap heading
h2 Bootstrap heading
h3 Bootstrap heading
h4 Bootstrap heading
h5 Bootstrap heading
h6 Bootstrap heading
Display headings are used to stand out more than normal headings (larger font-size and lighter font-weight):
The small element (and the .small class) is used to create a smaller, secondary text in any heading:
Use the mark element (or the .mark class) to highlight text.
The abbr element is used to mark up an abbreviation or acronym:
The WHO was founded in 1948.
The blockquote element is used to present content from another source:
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
The dl element indicates a description list:
Inline snippets of code should be embedded in the code element:
The following HTML elements: span
, section
, and div
defines a section in a document.
To indicate input that is typically entered via the keyboard, use the kbd element:
Use ctrl + p to open the Print dialog box.
For multiple lines of code, use the pre element:
Text in a pre element is displayed in a fixed-width font, and it preserves both spaces and line breaks.
Use the .lead class to make a paragraph "stand out":
This paragraph stands out.
This is a regular paragraph.
Left-aligned text.
Right-aligned text.
Center-aligned text.
No wrap text. No wrap text. No wrap text. No wrap text.
The .text-break class prevents long text from breaking layout.
With .text-break:
AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
Without .text-break:
AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz
Use the .text-decoration-none class to remove the underline from a link.
A link without underline.