App Dev Part 2
App Dev Part 2
Representing Text
ASCII
American Standard Code for Information Interchange.
7 7 bits: 128 128 different entities.
'a'..'z'
'A'..'Z'
'0'..'9'
Special characters: !@#$%^&*()_+{}|:"<>?~`[]\;',./...
Control characters: newline, tab, backspace, etc.
Unicode
Allow codes for more scripts, characters
Universal Character Set encoding - UCS
UCS-1 (UTF-8): 1 1 byte per character - max 256 = 2 8 256 = 2 8 characters
UCS-2 (UTF-16): 2 2 bytes per character - max 65 536 = 2 16 65 , 536 = 2 16 characters
,
32
UCS-4 (UTF-32): 4 4 bytes per character - max 4 4 Billion+ ( 4 294 967 296 4 , 294 , 967 , 296 = 2
, , , 2 32 )
characters
Here we can see, how we can represent characters in different encoding schemes.
UTF-8
Use 8 8 bits for most common characters: ASCII subset
All other characters can be encoded based on prefix string
Most common encoding in use today
Procedural
LaTeX is a procedural markup language.
Details on how to display
chnage font to large, bold, italic, etc.
skip 2 lines, indent 3 inches, etc.
Descriptive
This is a <title> , this is a <section> , etc...
HTML is a descriptive markup language.
Semantic Markup
Content vs Presentation
Semantics
Meaning of the text
structure or logic of the document
Example: using semantic tags like <header> , <main> , <footer> instead of <div> .
Timelines
SGML based
1989 1989 : HTML 1.0 1.0
1995 1995 : HTML 2.0 2.0
1997 1997 : HTML 3 3 , 4 4
XML based
XHTML - 1997 1997 to mid 2010 s 2010 s
HTML5
first release 2008
W3C recommendation - 2014 2014
HTML5
Block elements : <div>
Inline elements : <span>
Logical elements : <header> , <footer> , <nav> ,...
<center>
<font>
Documentation
Refer to MDN Web Docs �� for HTML documentation.
Refer to W3Schools �� for learning HTML
Refer to MDN Front-end Web Developer Learning Path �� for learning front-end web development.
L2.5 & 2.6: Introduction to Styling & Types of CSS styling and
Responsive Websties
CSS (Cascading Style Sheets)
CSS is a powerful language used for styling and visually enhancing HTML documents.
With CSS, you can control the layout, color, fonts, and many other aspects of your web pages.
There are multiple ways to apply CSS styles to HTML elements, giving you flexibility and control over the
appearance of your website.
1. Inline CSS
Inline CSS is the most basic and straightforward way to apply styles directly to individual HTML elements.
By using the <style> attribute within an HTML tag, you can specify CSS properties and values.
Example:
< p style = " color : orange ; font-size : 24 px ; " >
This is a paragraph with inline styles applied.
</ p >
Rendered HTML:
Rendered HTML:
This is a paragraph with internal styles applied.
3. External CSS
External CSS is the recommended and most scalable approach for styling HTML documents.
With this method, you create a separate CSS file with the .css extension and link it to your HTML document using
the <link> tag.
Example:
HTML file: index.html
p {
background-color : #c678dd ;
color : #282c34 ;
font-size : 28 px ;
font-weight : bold ;
font-style : italic ;
text-decoration : line-through ;
}
Rendered HTML:
2. Class Selector
.highlight {
background-color : yellow ;
}
Rendered HTML:
This is a paragraph with class selector applied.
3. ID Selector
Targets a specific element with a unique ID attribute.
Example:
< p id = " top " > Some para... </ p >
#top {
color : red ;
font-size : 24 px ;
}
Rendered HTML:
Some para...
4. Universal Selector
Rendered HTML:
This is a paragraph with universal selector applied.
Selector Priority
Documentation
Refer to MDN Web Docs �� for CSS documentation.
Refer to W3Schools �� for learning CSS.
Responsive Design
Responsive design is an approach to web design that aims to create websites that adapt and respond to different
screen sizes and devices.
It involves designing and developing websites in a flexible and fluid manner, using CSS media queries and other
forms, and grid systems, which can be easily customized and integrated into web projects.
Rapid Development
Bootstrap offers ready-to-use components and a responsive grid system, enabling developers to quickly prototype
and build websites or web applications.
Consistency
By utilizing Bootstrap's predefined styles and components, websites built with Bootstrap maintain a consistent and
professional look across different pages and sections.
Device Compatibility
Bootstrap's responsive features ensure that the website layout and components automatically adjust to different
devices, providing an optimal viewing experience for users on desktops, tablets, and mobile devices.