Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

HTML

WHAT IS HTML?
● HTML stands for Hyper Text Markup Language
● HTML is the standard markup language for creating webpages
● It describes the structure of a webpage
● It consists of a series of elements
● The HTML elements tells the browser how to display the content

EXAMPLE
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>


<p>My first paragraph.</p>

</body>
</html>

EXAMPLE EXPLAINED
● The <!DOCTYPE html> declaration defines that this document is an HTML 5 document
● The <html> element is the root element of an HTML page
● The <head> element contains meta information about the HTML page
● The <title> element specifies the title for the HTML page
● The <body> element defines the document's body, and is a container for all the visible
contents, such as heading, paragraph, image, hyperlink, etc…
● The <h1> element defines a large heading
● The <p> element defines a paragraph
WHAT IS AN HTML ELEMENT?
An HTML element is defined by a start tag, some content, and an end tag.

SYNTAX
<tagname> Content goes here… </tagname>

NOTE:
Some HTML elements have no content (like the <br> element). These elements are called
empty elements. Empty elements do not have an end tag.

CSS BORDER
● Dotted
● Dashed
● Solid
● Double border
● None
● Mixed border

CSS BACKGROUND
● background-color: This property specifies the background color of an element. The color
is most often specified by color name(“red”), a hex value (#ff0000), an rgb value
(255,0,0)
● background-image: This property specifies an image to use as a background of an
element
● background

HTML <ul> TAG


The <ul> tag defines an unordered list. Use the <ul> tag together with the <li> tag to create
unordered list
EXAMPLE:
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

CSS DISPLAY
This property specifies the display behavior (the type of rendering box) of an element

VALUE DESCRIPTION

inline Displays an element as an inline element.


Any height and width properties will have no
effect

block Displays an element as a block element. It


starts on a new line, and takes up the whole
width

<a> href Attribute


● The href attribute specifies the url of the page the link goes to
● If the href attribute is not present, the <a> tag will not be a hyperlink

SYNTAX
<a href= “url”>
CSS OVERFLOW
The overflow property specifies whether to clip the content or to add scroll bars when the
content of the element bar is too big to fit in the specified area. The overflow property has the
following values:

VISIBLE DEFAULT. The overflow is


not clipped. The content
renders outside the
elements’s box
HIDDEN The overflow is clipped, and
the rest of the content will be
visible

SCROLL The overflow is clipped, and a


scrollbar is added to see the
rest of the content

AUTO Similar to scroll, but it adds


scrollbars only when
necessary

HTML TABLE
● A table in HTML consists of table cells inside columns and rows
● <tr> -table row
● <th> -table heading
● <td> -table description / table data

EXAMPLE
<table>
<tr>
<th> Name </th>
<th> Age</th>
<th> Hobbies </th>
</tr>
<tr>
<td> Ali </td>
<td> 12 </td>
<td> Gaming </td>
</tr>
<tr>
<td> Ahmed </td>
<td> 15 </td>
<td> Cycling</td>
</tr>
<tr>
<td> Muhammad </td>
<td> 9 </td>
<td> Swimming </td>
</tr>
</table>

Name Age Hobby

Ali 12 Gaming

Ahmed 15 Cycling

Muhammad 9 Swimming

You might also like