Kayıtlar

HTML 3

  Creating Lists in HTML Hello friends, Now it’s time to create lists and tables... Let's start with lists first. In HTML, there are three types of lists: ordered lists, unordered lists, and definition lists. We will examine each type separately. Ordered List <html> <body> <ol> <li>Tea</li> <li>Coffee</li> <li>Milk</li> <li>Water</li> </ol> </body> </html> Unordered List <html> <body> <ul> <li>Tea</li> <li>Coffee</li> <li>Milk</li> <li>Water</li> </ul> </body> </html> In an ordered list, we use the <ol> tag, and each item is placed within <li>...</li> tags. The browser displays it as follows: Tea Coffee Milk Water The only difference in an unordered list is that we use <ul> instead of <ol> . The result in the br...

HTML 2

HTML Fonts In the previous lesson, we introduced HTML and learned the basic tags. Now, we will take it a step further. However, I want to clarify something first. In the last lesson, we mentioned that HTML5 is the latest version. With HTML5, some new features were introduced, while some older tags began to be deprecated. We will learn about these under the HTML5 section. For now, let's continue with the HTML tags that were commonly used until recently. We learned how to print text on the screen. The simplest way is: <html> <body> Hello World </body> </html> We can print "Hello World" on the screen. Now, let’s display it in different styles. Open Notepad and write the following: <html> <body> <b>Hello World</b><br/> <i>Hello World</i><br/> <u>Hello World</u><br/> <del>Hello World</del><br/> <sub>Hello World</sub> Hello World ...

HTML 1

In this lesson, I will introduce HTML to you and we will create a few simple examples. By the end of our HTML lessons, we will be able to create a web page. HTML, to give it its full name, Hyper Text Markup Language, is the fundamental language used to create web pages. There is no exact translation in Turkish, but there are various close approximations. We can say it means "Text Markup Language." It is important to note that HTML is not a programming language. You don’t need any special software to write HTML code. In our work, we will write our code in Notepad and then use any browser (Google Chrome, Firefox, Opera, etc.) to render it meaningfully. HTML was developed in 1990, and over time, several versions have been released. The most recent one is HTML5, which was released in 2012. Now, let’s start getting familiar with HTML code. HTML language consists of code blocks called tags. Tags are written between “<” and “>” symbols. For example: , , ... Usually, each...

Enums and Structs in C

Creating a New Data Type We have used many types of variables, such as integers, characters, floating-point numbers, and strings. However, the types of variables we can use are not limited to these. We can create our own variable types. For example, by creating a new type called boolean, we can restrict its possible values to true and false; there is no third option. Or, we can create a variable type called seasons and limit its possible values to months. Enums are used for such operations. The term "enum" comes from "enumerator," meaning "counter" or "enumerator." Life can be expressed with numbers. The most obvious examples of this can be seen while programming. For example, the letter A corresponds to the number 65 in the ASCII table, the capital letter B corresponds to 66, and so on. Computers don't understand signs, symbols, or characters; they only understand numbers. This is what enums serve. For example, if we choose 1 to represent ...

Strings in C

Strings We have seen arrays and multidimensional arrays. What we call a "string" is actually an array. Arrays with the data type char (characters) are called strings or "strings" in English. Strings do not differ from arrays in terms of functionality. For example, in an integer array ( int ), we store integers; in a character array (a string), we store characters. There is no fundamental difference. However, because they are frequently used, strings deserve special attention. If your operations are not scientific or computation-heavy, regardless of which language you use, the most common type of array you will interact with is the character array. We use character arrays for things like names, addresses, usernames, phone numbers, and anything else that can be expressed in words. This is why strings are important! In English, these are called "Strings", meaning something like a cord or rope. I don't know who first decided on the name "string...

Loops in C

The Concept of Loops One of the most critical structures in programming—regardless of the language—is loops. Loops can be thought of as blocks of code that perform a task a specified number of times. In a program that prints "Hello World" 10 times, the code to print "Hello World" is written just once, and the loop comes into play to repeat the code the desired number of times. What makes loops so critical is that if not written and optimized properly, they can unnecessarily consume your computer's processing power and increase the time spent executing the program. Conversely, a well-written loop will make your program run faster. All loops can be summarized in two basic stages. One stage is the logical query part where it is decided whether the loop should continue or not. For example, if you are printing "Hello World" 10 times on the screen, you check how many times the task has been done in the condition part. The other stage is the task the loop...

Functions

Functions in Procedural Languages like C One of the important topics in procedural languages like C is functions. In languages like Java or C#, they are called methods. Regardless of what they are called, their job is the same. Imagine doing the same operation multiple times. Writing the same code for every instance would be quite cumbersome. Functions are designed to solve this problem. You define the operation once, and then you can call the function as many times as needed. The benefits of functions don't stop there. Functions provide modularity. For example, let's say you've written a function to test if a number is prime, and you realize it's incorrect. You don't need to change the entire program—just fix the wrong function, and the program will work correctly. Additionally, moving the code of your functions to other programs is very simple. Functions make your work easier. Imagine writing a program that reads data from disk, processes it, then converts the...