final wmad lab report
final wmad lab report
DAY-6
LEARNING BASIC CSS CODE
1) Setting font properties
body {
font-family: Arial, sans-serif;
font-size: 16px;
font-weight: normal;
line-height: 1.5;
}
2) Setting text color and alignment
p{
color: #333;
text-align: left;
}
3) Styling links
a{
text-decoration: none;
color: #007bff; /* Link color */
}
a:hover {
text-decoration: underline;
}
4) Setting background color
body {
background-color: #f0f0f0;
}
5) Setting margins and padding
.container {
margin: 20px;
padding: 10px;
}
6) Styling headings
h1 {
font-size: 24px;
font-weight: bold;
}
h2 {
font-size: 20px;
font-weight: bold;
}
h3 {
font-size: 18px;
font-weight: bold;
}
7) Styling borders
.box {
border: 1px solid #ccc;
border-radius: 5px;
}
8) Styling lists
ul {
list-style-type: none;
}
li {
margin-bottom: 5px;
}
9) Setting width and height
.element {
width: 200px;
height: 100px;
10) Centering elements
.container {
display: flex;
justify-content: center;
align-items: center;
DAY-7
Learning and implementing Bootstrap and use
icon on web app.
Using icons in a web application is a common practice to
enhance user interface elements and provide visual cues.
Here's a step-by-step guide on how to use icons in a web
app using Bootstrap and Font Awesome, which is a popular
icon library.
STEP 1: Include Bootstrap and Font Awesome First,
include the necessary CSS files for Bootstrap and Font
Awesome in the <head> section of your HTML file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>My Web App</title>
<!-- Bootstrap CSS -->
<link
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/cs
s/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/5.15.4/css/all.min.css" rel="stylesheet">
</head>
<body>
<!-- Your content goes here -->
</body>
</html>
STEP 2: Choose an Icon Visit the Font Awesome website
or documentation to browse and choose the icon you want
to use. Font Awesome provides a wide range of free icons
that you can use in your web app.
STEP 3: Add the Icon Once you've chosen an icon, add
the appropriate HTML markup to your web page where
you want the icon to appear. You can use <i> or <span>
elements with specific classes to display the icon.
For example,
<i class="fas fa-search"></i>
STEP 4: Style and Customize You can further style and
customize the icon using CSS. For example, you can
change the size, color, or add animation effects to the icon.
For example,
.icon {
font-size: 24px; /* Change icon size */
color: #007bff; /* Change icon color */
}
STEP 5: Use Icons with Bootstrap Components
Bootstrap components often integrate with icons. For
example, you can add icons to buttons, navigation bars,
input fields, etc., by simply including the appropriate Font
Awesome class along with Bootstrap classes.
For example,
<button class="btn btn-primary"><i class="fas
fa-plus"></i> Add Item</button>
STEP 6: Test and Iterate Finally, test your web app to
ensure that the icons are displayed correctly and adjust their
placement, size, or styling as needed.
CONCLUSION