Professional Documents
Culture Documents
c369 Notes
c369 Notes
[HTML]
The HTML document itself begins with <html> and ends with </html>
The visible part of the HTML document is between <body> and </body>
<p> - paragraph
<br/>
The <br/> tag inserts a break
<head>
<title> Page Title </title>
</head>
<body>
<h1> This is a heading </h1>
<p> This is a paragraph </p>
<p> This is another paragraph </p>
<body>
</html>
-----------------------------------------
HYPERLINK------------------------------------------------
<a></a>
The anchor (<a>) element creates a hyperlink to another page.
The <a> tag must also contain a href attribute, which indicates the link's
e.g.
<p> Heres a <a href="https://website"> link to a website </a> </p>
Add images to your website by using the <img> tag and point to a specific image's
URL using the src attribute.
<img src="https://wwww.website.com/image.jpg">
All <img> elements must have an alt attribute. The text inside an alt attribute is
used for **screen readers to improve accessibility and is displayed if the image
fails to load;
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>C369 Module – heading </h1>
<p>Lesson 8 is HTML - paragraph.</p>
</body>
</html>
-----------------------------------------------------------------------------------
-------------
ORDERED LISTS
<ol>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ol>
UNORDERED LIST
<ul>
<li> </li>
<li> </li>
<li> </li>
<li> </li>
</ul>
COLOURS
<h1 style="background-color:DodgerBlue;">Hello Class </h1>
<p style="background-color:Tomato;">How are you doing ? </p>
<h1 style="background-color:#ff6347;">...</h1>
-----------------------------------------------------------------------------------
---------------
-----------------------------------------------------------------------------------
---------
FONT SIZE:
## Put this at the top of the codes to assign it to the h1 at the bottom ##
h1 {
font-size: 30px;
}
FONT TYPE:
h2 {
font-family: sans-serif;
}
Just like with fonts, we'll use px (pixels) to specify the image's width.
For example, if we wanted to give all HTML <img> Elements a width of 500 pixels,
we'd use:
img {
width: 500px;
}
img {
height: 500px;
}
-------------------------------------------------------------------------------
ALIGNING CODE
if we wanted all our text to be center, we would use the code below:
p {
text-align: center;
}
You can set an Element’s background colour with the background-color property:
html_element {
background-color: green;
}
---------------------------------------------------------------------------------
IMAGE BORDERS:
img {
border-color: red;
border-width: 5px;
border-style: solid;
}
BORDER RADIUS:
img {
border-radius: 50%;
}
(L10)
Arithmetic operators – addition (+), subtraction (-), multiplication (*), and
division (/).
Remainder operator – remainder operator (%) helps to get the remainder left over
when one value is divided by another value
</body>
</html>
<button type="button"
onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>
</body>
</html>