Web development using html

Содержание
  1. Structuring the web with HTML
  2. Looking to become a front-end web developer?
  3. Prerequisites
  4. Modules
  5. Solving common HTML problems
  6. See also
  7. Found a content problem with this page?
  8. Introduction
  9. Setup Our Project
  10. Let’s Start Our Project
  11. Introduction of HTML
  12. This is what it looks like when opened in a browser 👇
  13. Introduction of CSS
  14. The rules for declaring CSS
  15. For Adding Class
  16. Hello HTML Class Attribute Here class attribute is appended to the starting tag of with equal sign (=) and after = we add class name under quotation mark. For Adding Id Hello HTML Id Attribute Here class attribute is appended to the starting tag of with equal sign (=) and after = we add id name under quotation mark. After selecting a selector we open the curly brace, then we add the properties we want to style such as color, font, border, etc. Then we add the colon right after the property and then we add the value for that property, then end with a semicolon and the close curly brace. CSS can be added to HTML in 3 ways — 1. Inline CSS , 2. Internal CSS, 3. External CSS. 1. Inline Css Hello World ! To use inline css in html we need to use attribute. HTML attributes are special words used inside the opening tag to control the element’s behaviour. 2. Internal CSS Usually we use internal CSS when we make a one page website. It is defined with a style element under the tag. 3. External CSS For external css we create a new file with extension .css and link that page to html using link attribute. It is generally good practice to use external CSS and generate clean code as well. After creating the css file we can simply add the style with css. Now we have to add the css file to our portfolio website, after adding the css file our website looks like this👇 Previously we finished the HTML part, now we have to add the CSS, To add the css file we create a css external file named style.css then we have to link that page with html. For links we have to use attribute in tag. After creating style.css file we start our styling. body < background-color: rgb(255, 232, 155); text-align: center; margin-top: 6%; >p < font-family: "Courier New", Courier, monospace; font-size: 20px; >a < text-decoration: none; color: #fff; >ul < list-style-type: none; >table, th, td < background-color: #fff; margin-left: 28%; border: 1px solid black; padding: 10px; >button < padding: 10px; >#fb < background-color: #3b5998; >#link < background-color: #0077b5; >#git Lets understand the above css code, first we style our body with some background color for that we use CSS background-color property with value rgb(255, 232, 155) or you can write your favorite color code or name. After styling the background color, we now style our text position, for this we use the CSS text-align property with a value of center or you can choose different values ​​(left, right, etc). Now we style the margins with CSS margin-top property with a value of 6%, the margin-top property creates margins only from the top, if we only use the margin property they create margins from all sides. Now we style the paragraph from selecting a tag with CSS font-family property with a value of «Courier New», Courier, monospace, the font-family property changes the font style of paragraph, after styling the font style now we also style the size of font with CSS font-size property with value 20px. Источник
  17. with equal sign (=) and after = we add class name under quotation mark. For Adding Id Hello HTML Id Attribute
  18. For Adding Id
  19. Hello HTML Id Attribute
  20. with equal sign (=) and after = we add id name under quotation mark. After selecting a selector we open the curly brace, then we add the properties we want to style such as color, font, border, etc. Then we add the colon right after the property and then we add the value for that property, then end with a semicolon and the close curly brace. CSS can be added to HTML in 3 ways — 1. Inline CSS , 2. Internal CSS, 3. External CSS. 1. Inline Css Hello World !
  21. 1. Inline Css
  22. Hello World !
  23. 2. Internal CSS
  24. 3. External CSS

Structuring the web with HTML

To build websites, you should know about HTML — the fundamental technology used to define the structure of a webpage. HTML is used to specify whether your web content should be recognized as a paragraph, list, heading, link, image, multimedia player, form, or one of many other available elements or even a new element that you define.

Читайте также:  Static class and methods in php

Looking to become a front-end web developer?

We have put together a course that includes all the essential information you need to work towards your goal.

Prerequisites

Before starting this topic, you should have at least basic familiarity with using computers and using the web passively (i.e., just looking at it, consuming the content). You should have a basic work environment set up as detailed in Installing basic software, and understand how to create and manage files, as detailed in Dealing with files — both are parts of our Getting started with the web complete beginner’s module.

It is recommended that you work through Getting started with the web before attempting this topic. However, this isn’t absolutely necessary; much of what is covered in the HTML basics article is also covered in our Introduction to HTML module, albeit in a lot more detail.

After learning HTML, you can then move on to learning about more advanced topics such as:

  • CSS, and how to use it to style HTML (for example, alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects).
  • JavaScript, and how to use it to add dynamic functionality to web pages (for example, find your location and plot it on a map, make UI elements appear/disappear when you toggle a button, save users’ data locally on their computers, and much more).

Modules

This topic contains the following modules, in a suggested order for working through them. You should definitely start with the first one.

This module sets the stage, getting you used to important concepts and syntax, looking at applying HTML to text, how to create hyperlinks, and how to use HTML to structure a webpage.

This module explores how to use HTML to include multimedia in your web pages, including the different ways that images can be included, and how to embed video, audio, and even entire other webpages.

Representing tabular data on a webpage in an understandable, accessible way can be a challenge. This module covers basic table markup, along with more complex features such as implementing captions and summaries.

Solving common HTML problems

Use HTML to solve common problems provides links to sections of content explaining how to use HTML to solve very common problems when creating a webpage: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.

See also

This module provides a series of articles that will help you master the essentials of web forms. Web forms are a very powerful tool for interacting with users — most commonly they are used for collecting data from users, or allowing them to control a user interface. However, for historical and technical reasons it’s not always obvious how to use them to their full potential. We’ll cover all the essential aspects of Web forms including marking up their HTML structure, styling form controls, validating form data, and submitting data to the server.

The main entry point for HTML reference documentation on MDN, including detailed element and attribute references — if you want to know what attributes an element has or what values an attribute has, for example, this is a great place to start.

Found a content problem with this page?

This page was last modified on Jun 30, 2023 by MDN contributors.

Источник

Introduction

Alt Text

Web development is the work involved in developing a Web site for the Internet (World Wide Web). From building a personal website to building a social media web app, everything is a web development work and HTML and CSS are the beginning of everything you need to know to make your first web page. At the end of this blog, your first personal portfolio website will be ready.

Setup Our Project

First we need to set our project folder in our PC and after creating the folder we open that folder in any IDE (in my case I use VS Code), you can choose whatever you want. After opening the folder in IDE, we need to create files with .html extension for HTML file and .css for CSS file. VS-Code

*VS-Code*

*Codepen.io*

Let’s Start Our Project

Let

Introduction of HTML

Introduction

HTML is the hypertext markup language used to create the website structure and its content. Headlines, paragraphs, tables, links, images in a website are all done with HTML.
Let’s understand from code, open your project on IDE and in HTML file, write this code and open in your browser( right click and click Open in browser ).

Читайте также:  Unknown run configuration type python django server

This is what it looks like when opened in a browser 👇

Alt Text Start with This declaration defines that this document is an HTML5 document. HTML & HTML 5 both are same. HTML 5 are just updated version of HTML.
This declaration defines to declare the language of the Web page.
The element contains meta information about the HTML page.
Meta data may be used by browsers (content or methods of page reloading), search engines (keywords), or other web services, including keywords for page information, the author of the document, last modified, and metadata.
title element specifies a title for the HTML page (which is shown in the browser’s title bar or in the page’s tab). Using JavaScript you can change the title dynamically.
body tag is the main part or element of HTML document. It contain text content, paragraphs, headings, images, tables, links, videos, etc.
Now, in body tag we struct all the parts of website.
Alt Text Now, let’s start building our website structure. we start from heading, in HTML heading define with to tag.

define most important heading or largest font size heading and is for least important heading or smallest font size heading. After creating heading with to tag, now we move to paragraph where we use

tag to create paragraph in HTML. Above code you see that we put a heading in tag.
The tag is also known as the division tag, it makes it easy to create different divisions for websites like navbar, header, sidebar and footer etc. Alt Text I used tag for main title and tag for sub-heading, After title you see there is

tag which is used for paragraph.
Now after heading and paragraph let us see how we create table in HTML, as you see in the code i have again used tag for education title and after that i have used tag which is used to create a table in HTML. In tag we use tag which defines table row where we write our data, In the first tag we use tag which defines the table title, we add three titles in the first tag (degree, college, year), after that we put a content according to its title in the next tag and In the second tag we use the tag which defines the data cell in the HTML table. There are two types of cells in HTML table, first- header cell ( ) and second is data cell ( ). According to our table header we put our data in the data cell.
Alt Text Now after completing our table we move on to learn about unordered list and ordered list.
To create a list we have to use

    tag or
    tag which defines the order of the list.
      defines an unordered list (bullet) for a list (collection of items) with no numeric or alphabetical order and
      defines an ordered list which means that the collection of data (list) is numerically or alphabetically. Now we come to our last part of our website where we create our contact section where people can click on buttons to find you in different social media. Yes it is possible using HTML where people click on a button and that button send that user to your social media page. To create a button we use the tag which defines a clickable button. In button we can put different HTML tags or texts. In this project we put anchor tag tag that defines a hyperlink that links one page to another. In this anchor tag we will put social media link then when people click on button then that tag will take them directly to that page. Alt Text Now we are finally done with our HTML code 👇 , as earlier we have learned that HTML only forms the structure of our website but currently our website is not looking good so to beautify our website we need to use CSS What needs to be done is to make our website look good by giving it some color, margin and padding etc.

    Alt Text

    Introduction of CSS

    Alt Text

    CSS stands for Cascading Style Sheet , it is a style sheet language used to stylize our website by selecting HTML elements by adding colors, layouts and fonts. It also helps in adapting the presentation to different devices like large screen, small screen.

    The rules for declaring CSS

    Alt Text

    We have to choose which HTML elements we want to style, that element is called selector. we can select that element directly but when we need to select some specific section to style then we create a class or id for the element then we select that class or id and then style them. To create a class or id we need to add class attribute or id attribute to the html element.

    For Adding Class

    Hello HTML Class Attribute

    Here class attribute is appended to the starting tag of

    with equal sign (=) and after = we add class name under quotation mark.

    For Adding Id

    Hello HTML Id Attribute

    Here class attribute is appended to the starting tag of

    with equal sign (=) and after = we add id name under quotation mark.
    Alt Text

    After selecting a selector we open the curly brace, then we add the properties we want to style such as color, font, border, etc. Then we add the colon right after the property and then we add the value for that property, then end with a semicolon and the close curly brace. CSS can be added to HTML in 3 ways — 1. Inline CSS , 2. Internal CSS, 3. External CSS.

    1. Inline Css

    Hello World !

    To use inline css in html we need to use attribute. HTML attributes are special words used inside the opening tag to control the element’s behaviour.

    2. Internal CSS

    Usually we use internal CSS when we make a one page website. It is defined with a style element under the tag.

    3. External CSS

    For external css we create a new file with extension .css and link that page to html using link attribute. It is generally good practice to use external CSS and generate clean code as well.
    After creating the css file we can simply add the style with css.

    Now we have to add the css file to our portfolio website, after adding the css file our website looks like this👇

    Alt Text

    Previously we finished the HTML part, now we have to add the CSS, To add the css file we create a css external file named style.css then we have to link that page with html. For links we have to use attribute in tag. After creating style.css file we start our styling.

    body < background-color: rgb(255, 232, 155); text-align: center; margin-top: 6%; >p < font-family: "Courier New", Courier, monospace; font-size: 20px; >a < text-decoration: none; color: #fff; >ul < list-style-type: none; >table, th, td < background-color: #fff; margin-left: 28%; border: 1px solid black; padding: 10px; >button < padding: 10px; >#fb < background-color: #3b5998; >#link < background-color: #0077b5; >#git

    Lets understand the above css code, first we style our body with some background color for that we use CSS background-color property with value rgb(255, 232, 155) or you can write your favorite color code or name.
    After styling the background color, we now style our text position, for this we use the CSS text-align property with a value of center or you can choose different values ​​(left, right, etc).
    Now we style the margins with CSS margin-top property with a value of 6%, the margin-top property creates margins only from the top, if we only use the margin property they create margins from all sides.

    Now we style the paragraph from selecting a

    tag with CSS font-family property with a value of «Courier New», Courier, monospace, the font-family property changes the font style of paragraph, after styling the font style now we also style the size of font with CSS font-size property with value 20px.

    Источник

Оцените статью