A Newport teenager accused of attempted murder with another youth on a homeless man was heard boasting about the attack, a court heard.

Vladimirs Kazlausks, 54, is alleged to have been hit repeatedly with a chair or table leg in an underground road known as the "junkies' tunnel" underneath Kingsway centre in Newport on May 8 this year causing serious injuries.

An 18 year old witness spoke to the court via video link and described seeing the two youths in Newport town centre. He told the court: "[The younger boy] said he hit him 40 times. He was proud of doing it.

"He was laughing about it and all."

He said the younger defendant "pulled his trousers up over his leg and he showed me [a blood spatter]."

The two defendants, 15 and 17, cannot be named for legal reasons, both deny attempted murder.

A second witness, 17, said he met the two defendants after going into town with the witness. He said the older defendant told him: "I can't do this, I'm pranging."

The court heard 'pranging' is local slang meaning scared or worried.

He said the witness asked the defendants: "Did you hit someone?" [The younger boy] goes, "Killed someone more like".

The witness added the younger boy told them Mr Kazlausks "snored, like, and then stopped snoring. He went blank. They thought they'd killed him."

He said the older defendant told the two witness to look at the 15-year-old's leg.

"[The younger boy] showed us his leg. He had his sock tucked in.

"I was thinking, "Nah, he hasn't done it. I think it's paint on his leg. As a mate, I thought he wouldn't have done that."

He went on to say the older boy seemed agitated: "I saw [him] jumping up and down."

When they walked past the crime scene, the witness said both defendants said: "Don't look down there."

Andrew Morse, defending the 15-year-old, pointed out both witnesses had been friends with the older defendant for several years but did not know his client well.

Both boys blame the other for the attack.

Proceeding.