Internet Application Programming Lesson 3
Internet Application Programming Lesson 3
Internet Application Programming Lesson 3
PROGRAMMING
Learning Group:
BSc SE
Lecturer: Theuri Patrick
Lesson 3
learning topics
HTML handles tables very well, and you can use them to organize and
present complex data to your site visitors. For example, you could display
your store’s inventory in a table.
A table row can also be divided into table headings with the <th> tag.
1|Page
Html table Spanning column
Cell padding, cell spacing, and cell alignment are three different ways you
can control how cell content appears on a page.
4|Page
cell, however, there are separate settings for vertical and
horizontal alignment.
5|Page
3.1 HTML blocks
HTML Block and Inline Elements
Every HTML element has a default display value depending on what type
of element it is. The default display value for most elements is block or
inline.
<div>
<h1> - <h6>
<p>
<form>
The <div> element has no required attributes, but style and class are common.
When used together with CSS, the <div> element can be used to style blocks of
content:
6|Page
Inline Elements using <span> tag
An inline element does not start on a new line and only takes up as much
width as necessary.
<span>
<a>
<img>
Tag Description
7|Page
3.2 HTML Id and classes
HTML Id Attribute NB: * very important subtopic to learn
and understand in web development
Note: In the Cascading Style sheet (CSS), we can easily select an element with the
specific id by using the # symbol followed by id.
Note: JavaScript can access an element with the given ID by using the
getElementById () method.
Points to remember
When using id in CSS (cascading
style sheet)
ID Its detonated with # symbol
Two different color defining
cars and bikes represents the
uniqueness of id
8|Page
HTML Classes
Class Attribute in HTML
The HTML class attribute is used to specify a single or multiple class
names for an HTML element.
A class attribute can be defined within <style> tag or in separate
file using the (.) character.
In an HTML document, we can use the same class attribute name
with different elements.
When should I use class or ID? – id is used for single elements that
appear on the page for only once (e.g. header, footer, menu etc).
Whereas class is used for single or multiple elements that appear on the
page for once or more than once (e.g paragraph, links, buttons, input
boxes)
9|Page
Another Example with different class name
Let's use a class name "Fruit" with CSS to style all elements.
You can use JavaScript access elements with a specified class name by using the
getElementsByClassName () method
output
11 | P a g e
Warning: Avoid tables and inline styles for creating layouts. Layouts
created using tables often rendered very slowly. Tables should only be
12 | P a g e
Technical code terms explanations
background: #acb3b9;
13 | P a g e
<div class="container"> container is the overall layout defined
for each screen size HTML elements
like:<div><article><section><Form> and more.in short box layout
that includes from opening tag to closing tag.
1. A TRIBUTE PAGE
15 | P a g e