Professional Documents
Culture Documents
HTML and CSS
HTML and CSS
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>
</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
CSS DISPLAY
This property specifies the display behavior (the type of rendering box) of an element
VALUE DESCRIPTION
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:
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>
Ali 12 Gaming
Ahmed 15 Cycling
Muhammad 9 Swimming