HTML (HyperText Markup Language) is the standard markup language for creating web pages. It structures your web content. HTML consists of a series of elements, which you use to enclose or wrap different parts of the content to make it appear or act a certain way.
- Elements: HTML elements are the building blocks of HTML pages.
- Attributes: Elements can have attributes that provide additional information about the element.
- Tags: Elements are represented by tags.
<!-- This is a comment -->
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<a href="#">This is a link</a>
CSS (Cascading Style Sheets) is used for styling HTML elements. It describes how HTML elements should be displayed on screen.
- Selectors: Used to select the HTML element you want to style.
- Properties: The CSS properties like
font-size
,color
,margin
, etc., you want to apply. - Values: Each property is given a value to style the HTML element.
/* This is a comment */
body {
background-color: lightblue;
}
h1 {
color: white;
text-align: center;
}
Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. It contains HTML, CSS, and JavaScript-based design templates.
- Responsive: Makes it easy to create responsive designs.
- Components: Comes with a lot of pre-designed components like buttons, navbars, etc.
- Utilities: Provides utility classes for faster development.
<!-- Bootstrap Button -->
<button class="btn btn-primary">Click Me</button>
<!-- Bootstrap Card -->
<div class="card">
<div class="card-body">This is a card.</div>
</div>
In the examples, you'll often see placeholder image links like image1.jpg
. You should replace these with the actual paths to the images you want to use.
Comments are not displayed in the browser but can be useful for leaving notes in your code. In HTML, comments are wrapped in <!-- -->
and in CSS, they are wrapped in /* */
.
This commentary aims to provide a comprehensive summary and additional tips for better understanding HTML, CSS, and Bootstrap. Feel free to refer back to this page as you continue to learn and build more complex projects.