Skip to main content

Beginner's Guide to Web Design

The fundamentals of web design



Every day, we use the internet. We use Google to look up anything we need to know. We normally receive this information from numerous websites that end in with .com, .net, .org, and so on. This is known to as a domain name. We normally type the domain name (a request), and then the request is sent to the webserver. The web server looks up the domain's IP address and then looks for its contents. The response is then sent as HTML webpages to our computer or smartphone. The readers who are currently reading this article must be interested in learning about HTML. Be patient; we're here to talk about it first. HTML is a scripting language used to create websites. It creates separate portions of the website using various tags such as <head>, <body>, <footer>, <div>, and so on. Those tags aren't displayed when we're browsing a website. They create the website's skeleton or framework, which determines how the page will appear on screen. CSS, JavaScript, PHP, and MySQL are examples of other scripting languages. Client side scripting languages, such as HTML, CSS, and JavaScript, are scripting languages that may be executed directly by browsers. However, because PHP and MySQL are server-side scripting languages, we'll need a server to run them.
You may have observed that we refer to HTML, CSS, JavaScript, and other programming languages as "scripting languages." The term 'programming language' refers to a different type of language.


The following are the differences between 'Scripting' and 'Programming' languages:


Scripting languages are used to design webpages, whereas programming languages are used for web development, application development, and game creation, and other things. C, Java, Python, etc.  are well-known examples of programming languages.
Deep Dive
We require a compiler to execute a programming language, but we simply need an interpreter to run a scripting language in a browser. During the compilation process, the interpreter reads the entire program line by line. If there is a mistake in any line, the word 'error' will appear for whole program.
In the case of scripting languages, however, the interpreter only reads HTML code on a first-come-first-served basis. It usually loads the 'head' element first, then the 'body,' and finally the contents inside the 'body.' If there is an error in the scripting language's script, only those elements are displayed on the screen that are correct. Unlike the script of a programming language, this has no affect on the entire script.


P 4

Learn HTML & CSS


 The author's main goal in this tutorial is to teach HTML and CSS in a limited number of tutorials. You can use these codes in your HTML editor, such as Notepad++, Sublime, and others. We'll use numbers to represent codes in this case. We'll go over how to write code to execute in an editor for various purposes. One of the advantages is that you will quickly learn to code in HTML and CSS.


<html>

<head>

<title> My first webpage </title>

</head>

<body>

<p> Body part will appear here </p>

</body>

</html>


A basic HTML webpage is shown in the code above. Tags include items like <head>, <body>, etc. This is how a webpage's skeleton is built. We'll go through a lot of different tags and how they work. 

Instruction: Copy code and then paste into your HTML editor, then run it.


Some frequently used HTML tags

<p>: It is used for paragraph

<h1>: for major heading

<h6>: for minor heading. We use h1, h2, h3, h4, h5, h6 – all tags for heading. If we arrange this tags as per their font size that it will be h1>h2>h3>h4>h5>h6.

HTML Element: Let me give an example. Here <p> is an HTML tag but we use it to write paragraph. For example, <p> Hello World! </p>. Using this we’ll be able to write our paragraph. Now, <p> is called HTML tag and <p> Hello World! </p> is called HTML element.

<title>: To represent title of a webpage that is shown at the top of a browser, like, welcome, home, etc.

<div>: It is used for ‘division’. In HTML webpages we frequently need it to divide webpage in several divisions. One important thing is that we can apply different types of colours, styles, fonts, etc. to different divisions. For example, we keep background color of ‘division A’ is red & for ‘division B’ we keep it blue.

<id>: ‘id’ means identity. Here is HTML webpage we assign id to a particular HTML element so that we can find it easily or we can show it in a webpage very easily. Remember that id of an element will be unique.

 

Example:


<html>

<body>

<p> I am learning to code in HTML </p>

<h1> HTML & CSS </h1>

<h2> HTML & CSS </h2>

<h3> HTML & CSS </h3>

<h4> HTML & CSS </h4>

<h5> HTML & CSS </h5>

<h6> HTML & CSS </h6>

</body>

</html>

Instruction: copy the code and paste into HTML editor. Then run it. You'll see difference of font sizes among different HTML tags.


Result:










Example of  '<div>' tag: 

<html>
<head>
<title> HTML & CSS </title>
</head>
<body>
<div style="background-color: red;">
<h1>It is division A</h1>
<p> HTML is a markup language. Here we use different types of tags. The editor can distinguish between text and tags.  </p>
</div>
<hr>
<div style="background-color: blue;">
<h1>It is division B</h1>
<p>In this page you'll learn how to code in HTML and CSS easily. Although, HTML makes skeleton of webpage, CSS presents the webpage. It adds styles, font-size, color of text, background-color of a section, etc. </p>
</div>
</body>
</html>

Result:








Here, in the above code & result we've shown how '<div>' tag works. There are two divisions, division A & division B. We can write our own topic under different divisions. At the left top corner, 'HTML & CSS' is the title of the page. It may be something like, Welcome, Contact Us, etc. '<title>' tag is used to add tittle to a webpage.


Example of '<id>' tag:

<html>

<body>

<div id="first">

<h1> This is first division of my webpage </h1>

<p> "Id" stands for identity. In school, colleges, all students should have their id card. Similarly, in  a document we can put a id to a particular section so that we can find easily later. For that id of a section or division must be unique. In case of HTML pages we use id for different HTML elements, divisions, or sections, so that we can find it easily in hundreds of words. </p>

</div>

<div id="second">

<h1> This is second division of my webpage </h2>

<p> In a division you can write your content. You can write heading or subheading first. Then, you can discuss your  topics on webpage, etc. </p>

</div>

</body>

<style>

#first {

background-color: yellow;

}

#second {

background-color: grey;

}

</style>

</html>


Result








In the above code division 1 is assigned with id "first". Then we apply color to the division calling its id. We've used '<style>' tag to add style to the 'id' (indirectly, to add style to the division because we've assigned id to the division. As, we've talk about it that id is helpful to find HTML elements, Divisions, etc. in a webpage. For, example if there is a id in a webpage named "first" and we want to show it at the top of our webpage we simply type "www.example.com#first" to our browser then element or division or section with id "first" will appear top at the webpage. 


HTML class:

For all programming languages i.e., for java, class is an important thing. In case of programming languages class is prototype, where so many objects comes under a class. and we can use each object independently. For, example we can say "car" is a class, then set of cars, like, "BMW", "Volvo", etc. will be object. Hope you have understood the concept.

In HTML we can also use classes. One popular example of Class in HTML is "footer". 


Example:

<html>
<body style="background-color: #bbb; height: 500px; width: 200px;">
<p>Body part will appear here</p>
</body>
<div class="footer">
<p>You can use different columns for footer portion. You must see "about us", "contact us", etc. such types of columns in most of the webpages</p><br><br>
<p style="align: center;"> Copyright@ Your Website 2021. All Rights reserved</p>
</div>
</html>


Here in the above code we've used class "footer". Now whatever you write on your webpage footer portion always comes at bottom line of webpage and it must be visible irrespective of your content size. Now we can add different columns under class "footer". For your knowledge if you do not use footer then the portion may not be visible at the exactly bottom of the webpage if content is large in size. Here we've talk only about class "footer" but the may be other classes like, dropdown, etc.



 CSS Tutorial

CSS stands for 'Cascading Style Sheets'. While HTML prepares skeleton of HTML webpage, CSS give us proper presentation about a webpage. Using CSS we can add font-style, font-size, text-color, background-color, background-image, etc. Let me give some simple examples of CSS below:


CSS code for changing style, font-size, color of text

<html>
<head>
<title>CSS Tutorial</title>
</head>
<body>
<div>
<p>Body part will appear here.</p>
<p>In this tutorial you'll learn how to add style, i.e., color, font-size, color, text-alignment, button-style, etc. to a webpage. For effective learning copy and paste the code in your HTML editor. And run the code and see the result.</p>
</div>
</body>
<style>
p {
font-family: sans-serif;
font-style: italic;
font-size: 15px;
color: red;
}
</style>
</html>


Result









After running the HTML code on browser you can see text color is red and it is in italic style as we have applied in CSS code here. We can also control the font size as shown in code. To add CSS style to a HTML webpage we write CSS code inside <style></style> tags. In this tutorial or in previous tutorial you must have noticed that every tags has a closing tag, like, if we write <p> tag, then we must close it by </p> tag. Similar, examples are <head></head>, <body></body>, <div></div>, etc. But there are also exceptional cases, like, <br> tag used for break the line, <hr> for drawing horizontal line in webpage.  


CSS code for changing background-color of a webpage:

Changing background-color is related to the changing background-color of 'body' portion of a webpage.  


<html>

<body>

<h1>Body part will appear here</h1>

</body>

<style>

body {

background-color: #ddd;

}

</style>

</html>


Result:












 Alignment of Text using CSS

<html>
<body>
<h1 align = "center" style=" font-size: 25px;">Title of the topic will appear here!<h1>
<p align = "justify" style = "font-size: 20px;">Content of the topic is here. Here, in this tutorial author's main aim is to teach you CSS in less number tutorials. It will be very helpful for you to learn CSS very quickly. You can build an static webpage using HTML and CSS only. But to add dynamic view to your website you must have to learn JavaScript.</p>
</body>
<html>


Result






In the result you see we've aligned the title of the topic above in the middle of the webpage by using align="center"  in <h1> tag. Similarly, if we write the code inside <p>  tag then the text written under <p> tag will be central aligned but in the above code we've chosen the alignment of <p> tag as "justify". Alternatively, we can choose "Left" or "Right" alignment as well. You should try it in your own end. You must have noticed some different style of writing CSS code instead of writing <style></style> tag. In the above we have written CSS code for <h1> and <p> tags just inside it in such a way, like, <p style= "font-size: 20px;">If you look at the first code on the page, you'll notice that there's a different way of writing CSS code for styling tag, for example,

<style>
p {
font-family: sans-serif;
font-style: italic;
font-size: 15px;
color: red;
}
</style>

Both are correct.

Learn About JavaScript (World's first Web Programming Language) >>

(Remember that JavaScript is necessary for creating a dynamic website; HTML and CSS alone are insufficient. JavaScript enables you to develop on-click events (i.e., carry out a task after hitting a button, etc.), dropdown menus, dynamic sidebars, applications, games, etc. You can manipulate a webpage's html data by utilizing HTML DOM.)

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   Start Simulator for binary ASK Modulation Message Bits (e.g. 1,0,1,0) Carrier Frequency (Hz) Sampling Frequency (Hz) Run Simulation Simulator for binary FSK Modulation Input Bits (e.g. 1,0,1,0) Freq for '1' (Hz) Freq for '0' (Hz) Sampling Rate (Hz) Visualize FSK Signal Simulator for BPSK Modulation ...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...

📘 Overview of BER and SNR 🧮 Online Simulator for BER calculation of m-ary QAM and m-ary PSK 🧮 MATLAB Code for BER calculation of M-ary QAM, M-ary PSK, QPSK, BPSK, ... 📚 Further Reading 📂 View Other Topics on M-ary QAM, M-ary PSK, QPSK ... 🧮 Online Simulator for Constellation Diagram of m-ary QAM 🧮 Online Simulator for Constellation Diagram of m-ary PSK 🧮 MATLAB Code for BER calculation of ASK, FSK, and PSK 🧮 MATLAB Code for BER calculation of Alamouti Scheme 🧮 Different approaches to calculate BER vs SNR What is Bit Error Rate (BER)? The abbreviation BER stands for Bit Error Rate, which indicates how many corrupted bits are received (after the demodulation process) compared to the total number of bits sent in a communication process. BER = (number of bits received in error) / (total number of tran...

Q-function in BER vs SNR Calculation

Q-function in BER vs. SNR Calculation In the context of Bit Error Rate (BER) and Signal-to-Noise Ratio (SNR) calculations, the Q-function plays a significant role, especially in digital communications and signal processing . What is the Q-function? The Q-function is a mathematical function that represents the tail probability of the standard normal distribution. Specifically, it is defined as: Q(x) = (1 / sqrt(2Ï€)) ∫â‚“∞ e^(-t² / 2) dt In simpler terms, the Q-function gives the probability that a standard normal random variable exceeds a value x . This is closely related to the complementary cumulative distribution function of the normal distribution. The Role of the Q-function in BER vs. SNR The Q-function is widely used in the calculation of the Bit Error Rate (BER) in communication systems, particularly in systems like Binary Phase Shift Ke...

Channel Impulse Response (CIR)

📘 Overview & Theory 📘 How CIR Affects the Signal 🧮 Online Channel Impulse Response Simulator 🧮 MATLAB Codes 📚 Further Reading What is the Channel Impulse Response (CIR)? The Channel Impulse Response (CIR) is a concept primarily used in the field of telecommunications and signal processing. It provides information about how a communication channel responds to an impulse signal. It describes the behavior of a communication channel in response to an impulse signal. In signal processing, an impulse signal has zero amplitude at all other times and amplitude ∞ at time 0 for the signal. Using a Dirac Delta function, we can approximate this. Fig: Dirac Delta Function The result of this calculation is that all frequencies are responded to equally by δ(t) . This is crucial since we never know which frequenci...

Wireless Communication Interview Questions | Page 2

Wireless Communication Interview Questions Page 1 | Page 2| Page 3| Page 4| Page 5   Digital Communication (Modulation Techniques, etc.) Importance of digital communication in competitive exams and core industries Q. What is coherence bandwidth? A. See the answer Q. What is flat fading and slow fading? A. See the answer . Q. What is a constellation diagram? Q. One application of QAM A. 802.11 (Wi-Fi) Q. Can you draw a constellation diagram of 4QPSK, BPSK, 16 QAM, etc. A.  Click here Q. Which modulation technique will you choose when the channel is extremely noisy, BPSK or 16 QAM? A. BPSK. PSK is less sensitive to noise as compared to Amplitude Modulation. We know QAM is a combination of Amplitude Modulation and PSK. Go through the chapter on  "Modulation Techniques" . Q.  Real-life application of QPSK modulation and demodulation Q. What is  OFDM?  Why do we use it? Q. What is the Cyclic prefix in OFDM?   Q. In a c...

BER performance of QPSK with BPSK, 4-QAM, 16-QAM, 64-QAM, 256-QAM, etc

📘 Overview 📚 QPSK vs BPSK and QAM: A Comparison of Modulation Schemes in Wireless Communication 📚 Real-World Example 🧮 MATLAB Code 📚 Further Reading   QPSK provides twice the data rate compared to BPSK. However, the bit error rate (BER) is approximately the same as BPSK at low SNR values when gray coding is used. On the other hand, QPSK exhibits similar spectral efficiency to 4-QAM and 16-QAM under low SNR conditions. In very noisy channels, QPSK can sometimes achieve better spectral efficiency than 4-QAM or 16-QAM. In practical wireless communication scenarios, QPSK is commonly used along with QAM techniques, especially where adaptive modulation is applied. Modulation Bits/Symbol Points in Constellation Usage Notes BPSK 1 2 Very robust, used in weak signals QPSK 2 4 Balanced speed & reliability 4-QAM ...

What is - 3dB Frequency Response? Applications ...

📘 Overview & Theory 📘 Application of -3dB Frequency Response 🧮 MATLAB Codes 🧮 Online Digital Filter Simulator 📚 Further Reading Filters What is -3dB Frequency Response?   Remember, for most passband filters, the magnitude response typically remains close to the peak value within the passband, varying by no more than 3 dB. This is a standard characteristic in filter design. The term '-3dB frequency response' indicates that power has decreased to 50% of its maximum or that signal voltage has reduced to 0.707 of its peak value. Specifically, The -3dB comes from either 10 Log (0.5) {in the case of power} or 20 Log (0.707) {in the case of amplitude} . Viewing the signal in the frequency domain is helpful. In electronic amplifiers, the -3 dB limit is commonly used to define the passband. It shows whether the signal remains approximately flat across the passband. For example, in pulse shapi...

Coherence Bandwidth and Coherence Time

🧮 Coherence Bandwidth 🧮 Coherence Time 🧮 MATLAB Code s 📚 Further Reading For Doppler Delay or Multi-path Delay Coherence time T coh ∝ 1 / v max (For slow fading, coherence time T coh is greater than the signaling interval.) Coherence bandwidth W coh ∝ 1 / Ï„ max (For frequency-flat fading, coherence bandwidth W coh is greater than the signaling bandwidth.) Where: T coh = coherence time W coh = coherence bandwidth v max = maximum Doppler frequency (or maximum Doppler shift) Ï„ max = maximum excess delay (maximum time delay spread) Notes: The notation v max −1 and Ï„ max −1 indicate inverse proportionality. Doppler spread refers to the range of frequency shifts caused by relative motion, determining T coh . Delay spread (or multipath delay spread) determines W coh . Frequency-flat fading occurs when W coh is greater than the signaling bandwidth. Coherence Bandwidth Coherence bandwidth is...