HTML is the language for web page development. It stands for HyperText Markup Language. It is only used for the basic skeleton of web creation since the language is unable to preform dynamic functions like other programming languages are able to do.
Here's an example of a simple HTML markup code.
<header>This displays the header</header>
<p>This displays text</p>
<a href="">This is a link</a>
- The main differnece between markup languages and programming languages is that programming languages manipluate data, while markup languages determine how the elements are displayed.
- The way we access HTML websites is through .Websites can hold up to hundereds of HTML files for navigation. There are some websites that use CSS and JavaScript to add more appealing content.
HTML is a very popular markup langauge for designing pages for the web. It's simplicty and versatility along CSS and Javascript makes it a well accepted choice. Continuing with the discription of the langauage, there are many uses when it comes coding.
HTML has varrying uses to be applied for web design. This can range from documentation to wikis or even shopping. A good developer can design a page for any necessity. The code used for thes specific uses changes heavily. While one page is displays the information of the website, another may need the user to enter info for a survey.
Here's how web page input can be applied.
<label for="name">Name</label>
<input type="text">
<input type="submit">
This will display the code as:
- The biggest use for HTML is for navigating the internet and creating web pages. As mentioned before, HTML is a markup language and can only display how the elements are shown. (The paragraphs, headers, images are displayed in a specified order depending on the code.) Since it doesn't alter any data, the most it can do is display any info within the code. In other words, all it does is display text, images, and link without changing the data itself.
- Having a responsive web page is also common among HTML developers. Normal web pages are static in size, and do not alter the display to fit onto the screen it's viewed on. Responsive websites fit onto all screens and changes the layout for the best fit. If a page is not responsive, a mobile website may be created for devices for smaller displays.
- It is also possible to make video games through HTML. Although CSS and JavaScript is neccessary the program to work. Flash games were commonly coded before the release of HTML5 which made game development easier and more convient. CSS was used to stylize the game and JavaScript drew and wrote into the canvas that it was played on.
This result is obtained through the code:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
This line of code makes the page viewable on mobile devices. Without it, the page would try to automatically shrink everything on the page to fit the display perfectly as if it was on a computer. This causes problems with text and images being hard to view.
CSS is short for Cascading Style Sheets. It's sole purpose is to design the layout created from HTML. The main difference between HTML and CSS is their role in web design. While HTML displays the elements loaded from the code of the language, CSS mainpulates the code and layout, giving the developer more control over their page. Like the color of the text, the size of the styles, and even the background.
- CSS has the ability to do a lot for a HTML page. For one, it can format the colors for the text, backgrounds, links, and borders for a specific section of the page. It doesn't have to be a bland color either, gradients can be used for more dynamic visuals.
- Another advantage of using CSS is it's ability to be used across multiple HTML pages. Since all it takes to link to the CSS page is to input it's file at the beginning of the code, multiple HTML pages can formated the same with with a single CSS file. This can lead to global modification of a website. Changing text color for multiple pages could be done in just a line of code.
- Of course color changing isn't the only use for CSS. Overall stylization is another huge factor for the language. Manipulating the margin and padding gives a more confined and controlled look. This is included along the size of the text, it's font, and how it's positioned.
HTML Header
HTML Paragraph
HTML Input
HTML Link
Red text with a gold background centered in the middle
CSS is a very important language with developing the visuals of a website. Although it should be noted that it only enhances how the page works. JavaScript makes the web page more interactive.
With the creation of JavaScript, websites can be more dynamic with it's functionality. JavaScript is a programming language and can manipulate the data of a web page. Due to this nature, any errors found within JavaScript will cause the program to not function. HTML and CSS are a lot more forgiving when it comes to bugs as it can still function the page on a very basic level.
- JavaScript has the ability to handle commands that require operations and logic. Unlike HTML where it's very static in design. This can lead to the creation of displaying the time and date, and solving equations. This is due to JavaScript having elements commonly found in programming languages like operators and statements.
Here is very simple code for linking a JavaScript file to HTML.
<script src="script.js"></script>
Due to the versitlity of JavaScript, it's not just used for web design, but also for data visualization, moblie apps, video games, etc.
There are plenty of ways to showcase the potential of HTML.
- The above example combines both languages to show what the source code looks like. The HTML language gives the skeleton of the page where each part resides at.
- The CSS portion shows how the language changes the HTML code.
<title id="HTML-Title-Header">HTML Title</title>
<header>HTML Header</header>
<p>HTML Paragraph</p>
<ol>
<li>Ordered List 1</li>
<li>Ordered List 2</li>
<li>Ordered List 3</li>
</ol>
#HTML-Title-Header {
background-color: lightslategray;
color: snow;
}