HTML
HTML
2. Headings
Headings are used to define titles and subtitles.
html
CopyEdit
<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Smaller Subheading</h3>
4. Formatting Text
Used to style text.
html
CopyEdit
<b>Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<small>Smaller text</small>
<mark>Highlighted text</mark>
5. Lists
Ordered List (Numbered)
html
CopyEdit
<ol>
<li>First Item</li>
<li>Second Item</li>
</ol>
Unordered List (Bullet points)
html
CopyEdit
<ul>
<li>Apples</li>
<li>Oranges</li>
</ul>
6. Links (Hyperlinks)
Used to navigate between web pages.
html
CopyEdit
<a href="https://www.google.com">Visit Google</a>
7. Images
Used to display pictures.
html
CopyEdit
<img src="image.jpg" alt="Description of image">
8. Tables
Used to display data in a structured format.
html
CopyEdit
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
9. Forms
Used to collect user input.
html
CopyEdit
<form action="submit.php" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<input type="submit" value="Submit">
</form>
12. Buttons
Used to trigger actions.
html
CopyEdit
<button onclick="alert('Button Clicked!')">Click Me</button>
This list covers all essential HTML concepts for IGCSE ICT 0417. Let me know if you need
more explanations! 🚀
4o
You said:
html code list with functions and examples of how to implement them IGCSE ICT 0417
WITH design codes WITH CSS codes and links etc
ChatGPT said:
Here's a comprehensive guide covering HTML elements with functions, CSS styling, and
examples, tailored for IGCSE ICT 0417.
<h1>Welcome to My Website</h1>
<p>This is a simple webpage with design.</p>
</body>
</html>
📌 CSS Styling
Save this as style.css to apply design to the page.
css
CopyEdit
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
text-align: center;
}
h1 {
color: blue;
}
p{
font-size: 18px;
color: #333;
}
p{
color: gray;
line-height: 1.5;
}
📌 Lists
Function: Create numbered or bullet-point lists.
html
CopyEdit
<h3>Ordered List</h3>
<ol>
<li>First Item</li>
<li>Second Item</li>
</ol>
<h3>Unordered List</h3>
<ul>
<li>Apples</li>
<li>Oranges</li>
</ul>
CSS:
css
CopyEdit
ol {
color: darkgreen;
}
ul {
color: brown;
}
📌 Hyperlinks
Function: Navigate to another page or website.
html
CopyEdit
<a href="https://www.google.com" target="_blank">Visit Google</a>
CSS:
css
CopyEdit
a{
text-decoration: none;
color: blue;
}
a:hover {
color: red;
}
📌 Images
Function: Display pictures on a webpage.
html
CopyEdit
<img src="image.jpg" alt="Description of Image" width="300">
CSS:
css
CopyEdit
img {
border: 2px solid black;
border-radius: 10px;
}
📌 Tables
Function: Structure data in rows and columns.
html
CopyEdit
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
CSS:
css
CopyEdit
table {
width: 50%;
border-collapse: collapse;
margin: 20px auto;
}
th, td {
border: 1px solid black;
padding: 10px;
}
📌 Forms
Function: Collect user input.
html
CopyEdit
<form action="submit.php" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<input type="submit" value="Submit">
</form>
CSS:
css
CopyEdit
input {
padding: 5px;
border: 1px solid #333;
}
📌 Buttons
Function: Trigger actions on click.
html
CopyEdit
<button onclick="alert('Hello!')">Click Me</button>
CSS:
css
CopyEdit
button {
background-color: blue;
color: white;
padding: 10px 15px;
border: none;
cursor: pointer;
}
button:hover {
background-color: red;
}
📌 Complete Example:
Save as index.html
html
CopyEdit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>IGCSE ICT Website</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>My Stylish Web Page</h1>
<p>Welcome to my website!</p>
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>25</td>
</tr>
</table>
</body>
</html>
Save as style.css
css
CopyEdit
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
text-align: center;
}
h1 {
color: darkblue;
}
p{
font-size: 18px;
color: #333;
}
a{
text-decoration: none;
color: blue;}