|
Member 15952980 wrote: to get the job done out of Javascript or PHP. You probably need both: PHP runs in the server to do the backend work, while Javascript runs in the browser to manage the actual presentation (and data capture, etc.) of the web page.
You might be better looking into something like Wordpress which has many templates that you can adapt to your own needs.
|
|
|
|
|
Thankyou Richard.
Reguarding using Wordpress, I'm confident with HTML and CSS and was hoping to hand code the whole site to avoid generating lots of code I don't understand, and therefore wouldn't be able to debug more easily.
Are you familiar with Wordpress? (I've never used it but know it is avaialable as part of the hosting package I purchased for a HTML site I built)
If so do you envisage it being buggy within the context of the functionality I want?
|
|
|
|
|
Member 15952980 wrote: If so do you envisage it being buggy within the context of the functionality I want? I have not used Wordpress myself, but I know it is in wide use. As to whether it would be buggy, there is only one way to answer such a question.
|
|
|
|
|
Fair point. It may well be my best bet for now given the timeframe I have to work to.
|
|
|
|
|
Given the choice between JavaScript and PHP, master JavsScript and also use Node for the backend work. It'll take you further these days.
Jeremy Falcon
|
|
|
|
|
Thanks for insight. I've never heard of Node before and just read a basic introduction about what it can do on W3 schools... I notice that Node work in partnership with mysql as php does. Mysql is my intended progression after php or Node.js
So does using Node mean you can skip learing php altogether?
Also, considering it is javascript based, are the server side scripts run entirely on the server as with php? Or are there client and server security concerns that put using it at disadvantage compared to using an entirely server side language such as php?
|
|
|
|
|
Member 15952980 wrote: So does using Node mean you can skip learing php altogether? Yes
Member 15952980 wrote: Also, considering it is javascript based, are the server side scripts run entirely on the server as with php? Yes. One of the main advantages to Node too, is that you can have what's called an isomorphic application. Which is a fancy of way of saying you can run the same code on both the client and server. Stuff that accesses the DOM will be client only, but for algorithmic type routines it's the same code.
Member 15952980 wrote: Or are there client and server security concerns that put using it at disadvantage compared to using an entirely server side language such as php? No security concerns that PHP wouldn't also suffer. The main considerations are performance and available libraries. Google has put a lot of work into V8 (the JS engine Node is built on), so it's not nearly as slow as people would think. PHP can pre-compile into bytecode to speed up parsing prior to execution, but V8 also JITs in real time to native code in memory. Don't get me wrong, V8 will never be as fast as C/C++ or Rust and it's single threaded. But when compared to things like PHP, it does pretty well.
PHP vs Node js - Which programs are fastest?
PHP has a ton of built in functionality, like say for editing PDF files. Node doesn't. Fortunately, the community is huge for Node so finding a package to do most stuff is rarely a problem. In fact, it's so huge the real problem will be knowing which packages to avoid.
I say this as a dude who used to love PHP. I'll always have a fond soft spot for it, but times change.
Jeremy Falcon
|
|
|
|
|
Thank you very much Jeremy for taking the time to answer my questions and concerns.
I did do a course on PHP years ago, just before the laucnch of Node.js, and figured it would be easiest to just go back to learning that from scratch. But as you say times change.
You mention that PHP has a ton of functionality that Node doesn't.... My limited knowledge of php did leave me wanting to go forwards with certain capabilities. In a personal capacity I would like to build a music database. Would I be able to use Node, in conjuntion with mysql to:
- make directories (to, for example, store uploaded mp3 files)
- make pages (to, for example, print html code to make a html document)
Thanks in advance for your consideration
|
|
|
|
|
You'll be just fine in Node. It offers a bunch of modules to access things like the file system... on the server side. And there are plenty of ways to connect to a DB such as MySQL.
Jeremy Falcon
|
|
|
|
|
I need to do a small html code that looks like this: Imgupx - Upload and share your images[^]
I have tried some code, but it doesn't work:
<div>
<p>ER</p>
<img src="C:\Users\myname\Downloads\cici.png"/>
<p>341 Ohm</p>
<p>EN</p>
<img src="C:\Users\myname\Downloads\bibi.png"/>
<p>356</p>
</div>
|
|
|
|
|
For a personal web page only accessed from the same PC as the one it is being served from, you will have to use the 'file:' protocol (like http: / https: for remote sites). As you have it, it is looking for the 'C:' protocol - this is not a defined protocol. IIRC, the ':' after the 'C' needs encoding as a | e.g.
<img src="file:C|\Users\myname\Downloads\cici.png"/> For a web page accessed from a different location, you will have to save the images in a special folder (details vary based on the web server software - see your documentation) and the name will be relative to that server's root (and, in that instance, you can skipped putting the protocol component).
|
|
|
|
|
The image is for testing purpose only, the fact is the html page is like in the image: Imgupx - Upload and share your images[^]
How can I arrange multiple text and image anxt again like the image reveal ?
|
|
|
|
|
I have made it:
<div style="float:left;">
<p>ER</p>
<img src="C:\Users\myname\Downloads\cici.png"/>
<p>341 Ohm</p>
</div>
<div style="float:left;">
<p>EN</p>
<img src="C:\Users\myname\Downloads\bibi.png"/>
<p>356</p>
</div>
|
|
|
|
|
Your life will become much easier if you use a local web server for development.
- Install Node.js.
- Install a global npm package like local-web-server,
npm i -g local-web-server . - Go to your HTML files and run the web server in that directory,
ws .
If you ever do upload your work to a remote server, this will make your life much easier. Not to mention, things like cookies do not work when HTML pages are viewed over the file protocol.
Jeremy Falcon
|
|
|
|
|
How can I list several div's tags with the following pattern ?
Untitled hosted at ImgBB — ImgBB[^]
I have tried something like this:
.title{
display: inline;
}
.icon{
display: block;
}
.item-text{
float: right;
}
<div class="item-main">
<div class="title">
My title
</div>
<div class="icon">
<img src="...">
</div>
<div class="item-text">
Lorepsum imte ...
</div>
</div>
but don't work correctly.
modified 6-Mar-23 9:29am.
|
|
|
|
|
If you want the text to wrap, then float the image:
.title {
display: block;
}
.icon {
float: left;
margin-inline-end: .5em;
margin-block-end: .5em;
}
.item-text {
}
Demo[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Excellent, and if I would list several times that pattern, one under another ?
I did:
<div>
<div class="title">
Introduction To XHTML 1.0
</div>
<div class="icon">
<img src="http://dummyimage.com/200x200/f0f/fff" />
</div>
<div class="item-text">
Topics includes: Introduction To XHTML 1.0,
Introduction To Tag and Attribute Syntax,
Introduction To Element Content Syntax,
Document Structure and Head Level Tags,
Body Tag and Block Level Tags,
Understanding In-line Elements and Tags, etc
</div>
<div class="title">
Introduction To XHTML 2.0
</div>
<div class="icon">
<img src="http://dummyimage.com/200x200/f0f/fff" />
</div>
<div class="item-text">
222 2222 Topics includes: Introduction To XHTML 1.0,
Introduction To Tag and Attribute Syntax,
Introduction To Element Content Syntax,
Document Structure and Head Level Tags,
Body Tag and Block Level Tags,
Understanding In-line Elements and Tags, etc
</div>
</div>
but the pattern its not listed one under another.
|
|
|
|
|
Add clear: both; to the .title rule:
.title {
display: block;
clear: both;
} Demo[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you a lot Richard ! It works !
|
|
|
|
|
|
how we can can change a language English to Arabic integration in html
|
|
|
|
|
you need to add the dir and lang attributes to the tag in your HTML document.
The dir attribute specifies the direction of the text, and can have one of two values: rtl (right-to-left) for languages such as Arabic and ltr (left-to-right) for languages such as English.
The lang attribute specifies the language of the text, and should be set to the ISO 639-1 language code for the language you want to use, for Arabic, the language code is "ar".
Sample code will look something like this -
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="UTF-8">
<title>My Arabic Website</title>
</head>
<body>
<h1>مرحبا بالعالم</h1> <!--Hello World-->
<p>هذا هو موقعي الإلكتروني العربي.</p><!--This is my Arabic website-->
</body>
</html>
|
|
|
|
|
why doesn't the file I have submitted appear in the email?
|
|
|
|
|
You need to specify clearly which file did not show where, submitted how and in what email. What language, what code, where are the errors during debugging etc.
|
|
|
|
|
One or more of the following
You did not add it
It was too big
Something stripped it
You are looking in the wrong place
|
|
|
|